I have a vb script that runs through a logon group policy and creates a signature for outlook.
The information is taken from active directory objects and creates a signature personal to the user.
There is a logo that I want to add to the signature too and this is placed at the top of the signature.
The logo just places itself in the top left of the email body and was covering the text. I added paragraph objects to move the text down so that the image was not covering the text and trial and error got me to a point where it looked ok.
When I tried the same signature in outlook 2003 it took a paragraph object a little differently and the text was very far away from the logo.
Is there a way to keep the position of the logo constant across outlook versions? I may have done something unclever with the image insert and hopefully you can give me some pointers.
Below is the code from the group policy logon used to create the signature:
The information is taken from active directory objects and creates a signature personal to the user.
There is a logo that I want to add to the signature too and this is placed at the top of the signature.
The logo just places itself in the top left of the email body and was covering the text. I added paragraph objects to move the text down so that the image was not covering the text and trial and error got me to a point where it looked ok.
When I tried the same signature in outlook 2003 it took a paragraph object a little differently and the text was very far away from the logo.
Is there a way to keep the position of the logo constant across outlook versions? I may have done something unclever with the image insert and hopefully you can give me some pointers.
Below is the code from the group policy logon used to create the signature:
Code:
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set WshShell = CreateObject("WScript.Shell")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objuser.cn
strTitle = objUser.Title
strCred = objUser.info
strStreet = objUser.StreetAddress
strLocation = objUser.l
strCounty = objuser.st
strPostCode = objUser.PostalCode
strCompany = objuser.Company
strPhone = objUser.TelephoneNumber
strMobile = objUser.Mobile
strFax = objUser.FacsimileTelephoneNumber
strEmail = objUser.mail
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 16
objSelection.TypeText strName
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.TypeText Chr(11)
objSelection.TypeText Chr(11)
objSelection.TypeText "Phone: " & strPhone
objSelection.TypeText Chr(11)
if (strFax) Then objSelection.TypeText "Fax: " & strFax & Chr(11)
if (strMobile) Then objSelection.TypeText "Mobile: " & strMobile & Chr(11)
objSelection.TypeText "email: " & strEmail
objselection.TypeText Chr(11)
objselection.TypeText Chr(11)
objSelection.TypeText strCompany
objSelection.TypeText Chr(11)
objSelection.TypeText strStreet & ", " & strCounty & ", " & strPostCode
objSelection.TypeText Chr(11)
objSelection.TypeText "________________________________________________________"
objSelection.TypeText Chr(11)
objSelection.TypeText Chr(11)
objSelection.TypeText "disclaimer text
objSelection.TypeText Chr(11)
objSelection.TypeText Chr(11)
objSelection.TypeText "disclaimer text"
objSelection.TypeText Chr(11)
objSelection.TypeText "________________________________________________________"
objSelection.TypeText Chr(11)
objSelection.TypeText Chr(11)
objSelection.TypeText "disclaimer text
Set objShape = objDoc.Shapes
objShape.AddPicture("\\server\Logos\sig_icon.jpg")
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Full Signature", objSelection
objSignatureObject.NewMessageSignature = "Full Signature"
objDoc.Saved = True
objWord.Quit
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 10
if (strCred) Then objSelection.TypeText strName & ", " & strCred Else objSelection.TypeText strName
objSelection.TypeParagraph()
objSelection.TypeText strTitle
objSelection.TypeText Chr(11)
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Reply Signature", objSelection
objSignatureObject.ReplyMessageSignature = "Reply Signature"
objDoc.Saved = True
objWord.Quit