Guten Abend.
Mir schlägt hier ein Skript fehl, welches zum Generieren und anwenden einer Outlook-Signatur dient.
Die fette Zeile schlägt fehl.
Ich bin leider nicht ein versierter Skripter, bin allerdings darauf angewiesen, dass ich das zum Laufen bekomme.
Kann und will mir jemand helfen?
MfG | eightcore
Mir schlägt hier ein Skript fehl, welches zum Generieren und anwenden einer Outlook-Signatur dient.
Code:
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strUsername = objUser.sAMAccountName
strName = objUser.FullName
strFirstname = objUser.Firstname
strLastname = objUser.Lastname
strTitle = objUser.Title
strDepartment = objUser.Department
strCompany = objUser.Company
strPhone = objUser.telephoneNumber
strMobil = objUser.mobile
strEmail = objUser.mail
strPLZ = objUser.postalcode
strLand = objUser.l
strStreet = objUser.streetAddress
strFAX = objUser.facsimileTelephoneNumber
strDepartment = objUser.department
strDesc = objUser.description
[B]strGroup = LCase(Join(objUser.MemberOf))[/B]
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
'Ab hier Signatur bearbeiten'
'schrift einrichten:
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 10
'Text
objselection.typetext "Freundliche Grüsse"
objSelection.Typetext(chr(11))
objselection.typetext strFirstname & " " & strLastname
objSelection.Typetext(chr(11))
objSelection.Typetext(chr(11))
objSelection.Typetext "eMail:" & " " & streMail
objSelection.ParagraphFormat.Alignment = wdAlignParagraphCenter
objSelection.Typetext(chr(11))
objSelection.Typetext "_____________________________________________________________________________"
objSelection.Typetext(chr(11))
objSelection.Typetext(chr(11))
objSelection.Typetext "ICF Emmental"
objSelection.Typetext(chr(11))
objSelection.Typetext "" & strStreet
objSelection.Typetext(chr(11))
objSelection.Typetext strPLZ & " " & strLand
objSelection.Typetext(chr(11))
objSelection.Typetext(chr(11))
objSelection.Typetext "Telefon" & " " & strphone
objSelection.Typetext(chr(11))
objSelection.Typetext "Fax:" &" "& strFax
objSelection.Typetext(chr(11))
objSelection.Typetext "E-Mail:" &" " & strEmail
objSelection.Typetext(chr(11))
'Speichern als Signatur und als default einrichten.
Set objSelection = objDoc.Range()
objSignatureEntries.Add "AD Signature", objSelection
objSignatureObject.NewMessageSignature = "AD Signature"
objSignatureObject.ReplyMessageSignature = "AD Signature"
objDoc.Saved = True
objWord.Quit
Die fette Zeile schlägt fehl.

Ich bin leider nicht ein versierter Skripter, bin allerdings darauf angewiesen, dass ich das zum Laufen bekomme.
Kann und will mir jemand helfen?
MfG | eightcore