Hello,
I'm writing a script that will run every time users login that creates a email signature for the Active Directory Data and then sets this signature as default.
This part is working great, but the problem I have is I need to insert a graphic in a particular location in the signature.
I have use "Hi, Scripting Guys" code of :-
Const wdShapeRight = -999996
Const wdWrapSquare = 0
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objShape = objDoc.Shapes
objShape.AddPicture("C:\Scripts\Welder-small.jpg")
Set objShapeRange = objDoc.Shapes.Range(1)
objShapeRange.Left = wdShapeRight
objShapeRange.WrapFormat.Type = wdWrapSquare
( )
and tweaked the code to right align, which, again, works, But its sitting at the top right of the email signature and I need it to sit at the bottom right of the signature, in line with the last line of text in the signature and above the horizontal line I have going across it.
If tried seting up
ObjShapeRange.Top = any value
but it doesn't seem to affect the images vertical position at all.
Please can someone help me ?
thanks
I'm writing a script that will run every time users login that creates a email signature for the Active Directory Data and then sets this signature as default.
This part is working great, but the problem I have is I need to insert a graphic in a particular location in the signature.
I have use "Hi, Scripting Guys" code of :-
Const wdShapeRight = -999996
Const wdWrapSquare = 0
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objShape = objDoc.Shapes
objShape.AddPicture("C:\Scripts\Welder-small.jpg")
Set objShapeRange = objDoc.Shapes.Range(1)
objShapeRange.Left = wdShapeRight
objShapeRange.WrapFormat.Type = wdWrapSquare
( )
and tweaked the code to right align, which, again, works, But its sitting at the top right of the email signature and I need it to sit at the bottom right of the signature, in line with the last line of text in the signature and above the horizontal line I have going across it.
If tried seting up
ObjShapeRange.Top = any value
but it doesn't seem to affect the images vertical position at all.
Please can someone help me ?
thanks