Links forkert størrelse.. VBS.. Signatur.
Mit VBS script til oprettelse af email signatur virker fint.Dog er mine hyperlinks forkert font type og size.
Søger tag til at styre dette.
'On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strLogo = "\\a\logo.jpg"
strLogoJul = "\\a\ejul2007.jpg"
strName = objUser.FullName
strTitle = objUser.Title
strPhone = objUser.telephoneNumber
strMail = objUser.Mail
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
objSelection.TypeText " "
objSelection.InlineShapes.AddPicture(strLogo)
objSelection.TypeText Chr(11)
'Firmaer
objSelection.Font.Name = "Verdana"
objSelection.Font.Color = RGB(117,117,117)
objSelection.Font.bold = true
objSelection.Font.Size = "7,5"
objSelection.TypeText "______________________________" & Chr(11)
objSelection.Font.bold = false
objSelection.Font.Size = 7
objSelection.Font.Color = RGB(0,0,0)
objSelection.TypeText "Firma" & Chr(11)
'Spacing
objSelection.Font.Size = 4
objSelection.TypeText " " & Chr(11)
'Navn, Titel og telefon
objSelection.Font.Size = 8
objSelection.TypeText strName & Chr(11)
if strTitle <> "" then
objSelection.TypeText strTitle & Chr(11)
end if
objSelection.TypeText "Adresse" & Chr(11)
if strPhone <> "" then
objSelection.TypeText right(strPhone,3) & Chr(11)
end if
if strMail <> "" then
objSelection.TypeText "mail:"
objSelection.Hyperlinks.Add objSelection.range, "mailto:" & Trim(strMail) & Chr(11), , , Trim(strMail) & Chr(11)
end if
objSelection.TypeText Chr(11) & Chr(11) & Chr(11) & Chr(11) & " "
objSelection.InlineShapes.AddPicture(strLogoJul)
objSelection.TypeText Chr(11) & Chr(11) & "Vi støtter Julemærkesagen"
objSelection.TypeText " "
objSelection.Hyperlinks.Add objSelection.range, "http://www.julemaerket.dk", , ,"Klik her"
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Signatur", objSelection
objSignatureObject.NewMessageSignature = "Signatur"
objSignatureObject.ReplyMessageSignature = "Signatur"
objDoc.Saved = True
objWord.Quit
wscript.echo "Din e-mailsignatur er nu oprettet og ligger i Outlook." & VbCr & VbCr & "Kontrollere at dine oplysninger korrekte. Har du rettelser, kan du med fordel benytte den vedhæftede brugervejledning!"