Hallo
Bei mir in der Firma habe ich ein Script geschrieben, welches beim Anmelden automatisch die Signatur für den angemeldeten User erstellt. Dies funktioniert auch gut, jedoch gibt es bei manchen Usern eine Fehlermeldung, bei welcher ich nicht erahnen kann was das Problem sein könnte.
Fehlermeldung:
Skript:
\\Pfadangabe\autosignatur.vbs
Zeile: 110
Zeichen: 1
Fehler: Klasse unterstützt keine Automatisierung
Code: 800A01AE
Quelle: Laufzeitfehler in Microsoft VBScript
Interessant ist auch, dass bei den Usern, bei welchen die Fehlermeldung auftritt, die Signatur trotzdem erstellt wird.
Code:
Vielen Dank schon mal für euer Bemühen!
Bei mir in der Firma habe ich ein Script geschrieben, welches beim Anmelden automatisch die Signatur für den angemeldeten User erstellt. Dies funktioniert auch gut, jedoch gibt es bei manchen Usern eine Fehlermeldung, bei welcher ich nicht erahnen kann was das Problem sein könnte.
Fehlermeldung:
Skript:
\\Pfadangabe\autosignatur.vbs
Zeile: 110
Zeichen: 1
Fehler: Klasse unterstützt keine Automatisierung
Code: 800A01AE
Quelle: Laufzeitfehler in Microsoft VBScript
Interessant ist auch, dass bei den Usern, bei welchen die Fehlermeldung auftritt, die Signatur trotzdem erstellt wird.
Code:
Code:
Dim wshShell
Set wshShell = WScript.CreateObject("WScript.Shell")
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
strLocation = objUser.l
strStreet = objUser.streetAddress
strFAX = objUser.facsimileTelephoneNumber
strDepartment = objUser.department
strDesc = objUser.description
strWeb = objuser.wWWHomePage
If IsArray(objUser.MemberOf) Then
strGroup = LCase(Join(objUser.MemberOf))
Else
strGroup = lcase(objUser.MemberOf)
End If
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.Bold = False
objSelection.Font.Size = "10"
objSelection.Font.Color = RGB(99,102,106)
objselection.typetext "Freundliche Grüsse"
objSelection.Typetext(chr(11))
objSelection.Typetext(chr(11))
objSelection.Font.Name = "Arial"
ObjSelection.Font.Bold = True
objSelection.Font.Size = "10"
objSelection.Font.Color = RGB(99,102,106)
objselection.typetext strFirstName & " " & StrLastName
objSelection.Typetext(chr(11))
objSelection.Font.Name = "Arial"
ObjSelection.Font.Bold = False
objSelection.Font.Size = "10"
If strTitle = "" then
objSelection.Font.Size = "4"
Else
objSelection.TypeText strTitle
objSelection.Font.Size = "4"
objSelection.Typetext(chr(11))
End If
objSelection.Font.Size = "10"
If strDepartment = "" then
Else
objSelection.TypeText strDepartment
objSelection.Typetext(chr(11))
End If
objSelection.Font.Size = "4"
objSelection.Typetext(chr(11))
Set shp = objSelection.InlineShapes.AddPicture("\\pfad\logo.png")
objSelection.Typetext(chr(11))
objSelection.Font.Size = "10"
objSelection.Typetext "––––––––––––––––––––––––––––––––––––––"
objSelection.Typetext(chr(11))
objSelection.Font.Color = RGB(00,151,169)
objSelection.Typetext strCompany
objSelection.Typetext(chr(11))
objSelection.Font.Color = RGB(99,102,106)
objSelection.Typetext strStreet & " • " & StrPLZ & " " & strLocation
objSelection.Typetext(chr(11))
objSelection.Typetext strPhone
objSelection.Typetext(chr(11))
objSelection.Font.Name = "Arial"
Set objLink = ObjSelection.Hyperlinks.Add (objSelection.range, strWeb,,,strWeb)
objLink.Range.Font.Color = RGB(99,102,106)
objLink.Range.Font.Name = "Arial"
objLink.Range.Font.Size = "10"
objLink.Range.Font.Underline = False
objSelection.Typetext(chr(11))
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Default" , objSelection
objSignatureObject.NewMessageSignature = "Default"
objSignatureObject.ReplyMessageSignature = "Default"
objDoc.Saved = True
objWord.Quit
Vielen Dank schon mal für euer Bemühen!
