Sikerült össze google-zni egy vbs scriptet ami automatikusan le generál egy outlook aláírást, a felhasználó AD-ban tárolt adataiból. Hogyan állítsam be, hogy az aláírás automatikusan bekerüljön az email-be?
Valószínűleg a registry-vel kell játszani.
Íme a script:
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set WshShell = CreateObject("WScript.Shell")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strName = objUser.FirstName & " " & objUser.LastName
strTitle = objUser.Title
strCred = objUser.info
strStreet = objUser.StreetAddress
strLocation = objUser.L
strPostCode = objUser.PostalCode
strPhone = objUser.TelephoneNumber
strFax = objUser.FacsimileTelephoneNumber
strEmail = objUser.mail
strCompany = objUser.Company
strDepartment = objUser.Department
strOffice = objUser.physicalDeliveryOfficeName
strweb = objuser.HomePage
strPost = objUser.PostalCode
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 = "VALUE"
objSelection.Font.Name = "Verdana"
objselection.Range.Font.name = "verdana"
objSelection.Font.Size = 10
objSelection.TypeText "Üdvözlettel"
objSelection.TypeText Chr(11)
objSelection.Font.Italic = true
objSelection.TypeText "King Redgards"
objSelection.Font.Italic = false
objSelection.TypeText Chr(11)
objSelection.Font.Bold = true
objSelection.TypeParagraph()
if (strCred) Then objSelection.TypeText strName & ", " & strCred Else objSelection.TypeText strName
objSelection.Font.Bold = false
objSelection.TypeText Chr(11)
objSelection.TypeText strTitle
objSelection.TypeText Chr(11)
objSelection.Font.Italic = true
objselection.Typetext strDepartment
objSelection.Font.Italic = false
objSelection.TypeParagraph()
objSelection.TypeText "Phone: " & strPhone & Chr(11)
if (strFax) Then objSelection.TypeText "Fax: " & strFax & Chr(11)
objSelection.TypeText "Email: "
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range, "mailto: " & strEmail, , , strEmail)
objLink.Range.Font.Size = "10"
objLink.Range.Font.name = "verdana"
objSelection.TypeParagraph()
objSelection.TypeText strCompany
objSelection.TypeText Chr(11)
objselection.Typetext strOffice
objSelection.TypeText Chr(11)
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range, " http://" & strWeb,, "", strWeb )
objLink.Range.Font.Size = "10"
objLink.Range.Font.name = "verdana"
objSelection.TypeParagraph()
objSelection.InlineShapes.AddPicture "\\192.168.6.140\netlogon\Logo.bmp"
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Alairas", objSelection
objSignatureObject.NewMessageSignature = "Alairas"
objSignatureObject.ReplyMessageSignature = "Alairas"
objDoc.Saved = True
objWord.Quit
Kapcsolódó kérdések:
Minden jog fenntartva © 2024, www.gyakorikerdesek.hu
GYIK | Szabályzat | Jogi nyilatkozat | Adatvédelem | Cookie beállítások | WebMinute Kft. | Facebook | Kapcsolat: info(kukac)gyakorikerdesek.hu
Ha kifogással szeretne élni valamely tartalommal kapcsolatban, kérjük jelezze e-mailes elérhetőségünkön!