So I've set up a VB script to query AD and generate an Outlook signature.
Is anyone able to tell me how I can make the www.webpage.com hyperlink the following style: Verdana/Bold/sz9/RGB(0,112,192) just like the trading name text, rather than the default font and style used for hyperlinks.
I really have no idea what I'm doing here, I've been completely winging this.
Here's a what Im getting at the moment:
Heres a copy of the script:
Is anyone able to tell me how I can make the www.webpage.com hyperlink the following style: Verdana/Bold/sz9/RGB(0,112,192) just like the trading name text, rather than the default font and style used for hyperlinks.
I really have no idea what I'm doing here, I've been completely winging this.
Here's a what Im getting at the moment:
Heres a copy of the script:
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objUser.FullName
strTitle = objUser.description
strPhone = objUser.ipPhone
strEmail = objUser.emailaddress
strMobile = objUser.mobile
strFax = objUser.facsimileTelephoneNumber
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
objSelection.Style = "No Spacing"
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
'Company Logo
objSelection.InlineShapes.AddPicture("\\DOMAIN-NAME-HERE\netlogon\email-signiture-logo.jpg")
objSelection.TypeParagraph()
objSelection.TypeParagraph()
'Display Name
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = True
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(0,112,192)
objSelection.TypeText strName
objSelection.TypeText(Chr(11))
'Description
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = False
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(77,77,77)
objSelection.TypeText strTitle
objSelection.TypeText(Chr(11))
objSelection.TypeParagraph()
objSelection.TypeParagraph()
'Trading Name
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = True
objSelection.Font.Size = "9"
objSelection.Font.Color = RGB(0,112,192)
objSelection.TypeText "TRADING NAME"
objSelection.TypeParagraph()
objSelection.TypeParagraph()
'T:
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = True
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(146,208,80)
objSelection.TypeText "T: "
'IP Phone
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = False
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(77,77,77)
objSelection.TypeText strPhone
objSelection.TypeParagraph()
'F:
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = True
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(146,208,80)
objSelection.TypeText "F: "
'Fax
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = False
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(77,77,77)
objSelection.TypeText strFax
objSelection.TypeParagraph()
'M:
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = True
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(146,208,80)
objSelection.TypeText "M: "
'Mobile
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = False
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(77,77,77)
objSelection.TypeText strMobile
objSelection.TypeParagraph()
'E:
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = True
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(146,208,80)
objSelection.TypeText "E: "
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = False
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(77,77,77)
objLink = objSelection.Hyperlinks.Add(objSelection.Range,"mailto:" & stremail & " ", , , stremail)
objSelection.TypeParagraph()
objSelection.TypeParagraph()
objSelection.TypeParagraph()
'Slogan
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = False
objSelection.Font.Italic = True
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(77,77,77)
objSelection.TypeText "slogan here"
objSelection.TypeParagraph()
'URL
objSelection.Font.Name = "Verdana"
objSelection.Font.Bold = True
objSelection.Font.Size = "9.5"
objSelection.Font.Color = RGB(0,112,192)
objLink = objSelection.Hyperlinks.Add(objSelection.Range,"http://www.webpage.com",,"Our Webpage", "www.webpage.com")
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Standard Signature", objSelection
objSignatureObject.NewMessageSignature = "Standard Signature"
objSignatureObject.ReplyMessageSignature = "Standard Signature"
objDoc.Saved = True
objWord.Quit