I am trying to get a script to position and size an image correctly into a Outlook signature script. I have researched but to no success and wondered if someone could help me please?
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objUser.FullName
strTitle = objUser.Title
strDescription = objuser.Description
strCompany = objUser.Company
strmail = objUser.mail
strlogo = "c:\logo.jpg"
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.Style = "No Spacing"
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "9"
objSelection.Font.Color = "669999"
objSelection.TypeText strName
objSelection.TypeParagraph()
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "9"
objSelection.Font.Bold = true
objSelection.TypeText strDescription
objSelection.Font.Bold = false
objSelection.TypeParagraph()
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "9"
objSelection.Hyperlinks.Add objSelection.range, "mailto:" & strMail, , , strMail
objSelection.TypeParagraph()
objSelection.ClearFormatting()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
Set objShape = objDoc.Shapes
objShape.AddPicture(strlogo)
Set objShapeRange = objDoc.Shapes.Range(1)
objShapeRange.WrapFormat.Type = wdWrapInline
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Signature", objSelection
objSignatureObject.NewMessageSignature = "Signature"
'objSignatureObject.ReplyMessageSignature = "Signature"
objDoc.Saved = True
objWord.Quit
Thanks
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objUser.FullName
strTitle = objUser.Title
strDescription = objuser.Description
strCompany = objUser.Company
strmail = objUser.mail
strlogo = "c:\logo.jpg"
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.Style = "No Spacing"
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "9"
objSelection.Font.Color = "669999"
objSelection.TypeText strName
objSelection.TypeParagraph()
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "9"
objSelection.Font.Bold = true
objSelection.TypeText strDescription
objSelection.Font.Bold = false
objSelection.TypeParagraph()
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "9"
objSelection.Hyperlinks.Add objSelection.range, "mailto:" & strMail, , , strMail
objSelection.TypeParagraph()
objSelection.ClearFormatting()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
Set objShape = objDoc.Shapes
objShape.AddPicture(strlogo)
Set objShapeRange = objDoc.Shapes.Range(1)
objShapeRange.WrapFormat.Type = wdWrapInline
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Signature", objSelection
objSignatureObject.NewMessageSignature = "Signature"
'objSignatureObject.ReplyMessageSignature = "Signature"
objDoc.Saved = True
objWord.Quit
Thanks