quarta-feira, 23 de setembro de 2015
Script para Padronizar a assinatura do outlook em VBS
Padronizar a assinatura do outlook em sua empresa.
Mas para isso as informações do Usuário no AD, devem estar preenchidas.
Modelo:
————————————————————————————————————
Nome do Usuário
Departamento de TI
Nome da EmpresaEndereço da empresa, XXXX – 3° andar
04000-100 – São Paulo – Brazil
Tel. + 55 11 2222.3333
Fax. + 55 11 4444.5555
Email user@dominio.com.br
Site http://www.empresa.com.br
AQUI APARECE O LOGO DA EMPRESA
Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não pode usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor, avise imediatamente o remetente, respondendo o e-mail, e em seguida apague-o.Agradecemos sua cooperação.
This message may contain confidential and/or privileged information. If you are not the address or authorized to receive this for the address, you must not use, copy, disclose or take any action base on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thankyou for your cooperation
—————————————————————————————————————————————-
‘ O Script:
On Error Resume Next
Set objSysInfo = CreateObject(“ADSystemInfo”)
strUser = objSysInfo.UserName
Set objUser = GetObject(“LDAP://” & strUser)
With objUser
strName = .FullName
strTitle = .Description
End With
strCompany = objUser.Company
strAddress = objUser.streetAddress
strpostalCode = objUser.postalCode
strl = objUser.l
strco = objUser.co
strPhone = objUser.TelephoneNumber
strFax = objUser.facsimileTelephoneNumber
strMail = objuser.mail
strWeb = objuser.wWWHomePage
Set objword = CreateObject(“Word.Application”)
With objword
Set objDoc = .Documents.Add()
Set objSelection = .Selection
Set objEmailOptions = .EmailOptions
End With
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
With objSelection
.ParagraphFormat.Alignment = wdAlignParagraphRight
.TypeParagraph
With .Font
.Name = “Verdana”
.Size = 10
.Bold = false
End With
.TypeText strName & Chr(11)
With .Font
.Name = “Verdana”
.Size = 8
.Bold = False
.Italic = False
End With
.TypeText strTitle & Chr(11)
.TypeText Chr(11)
objSelection.Font.Size = “10”
objSelection.Font.Name = “verdana”
objSelection.Font.Bold = True
objSelection.TypeText strCompany
objSelection.Font.Bold = True
.TypeText Chr(11)
With .Font
.Name = “Verdana”
.Size = 8
.Bold = false
End With
.Font.Italic = False
.TypeText strAddress & Chr(11) & strpostalCode & ” – ” & strl & ” – ” & strco & Chr(11) & “Tel. + ” & strPhone & Chr(11) & “Fax. + ” & strFax & Chr(11) & “Email ” & strMail & Chr(11) & “Site ” & strWeb & Chr(11)
.TypeText Chr(11)
.InlineShapes.AddPicture “\\Server\LogoDaEmpresa.jpg“, True, True
.TypeText Chr(11)
.TypeText Chr(11)
objSelection.Font.Size = “8”
objSelection.Font.italic = true
objSelection.Font.Color = 8421504
objSelection.Font.Bold = False
objSelection.TypeText “Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não pode usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor, avise imediatamente o remetente, respondendo o e-mail, e em seguida apague-o. Agradecemos sua cooperação.”
.TypeText Chr(11)
.TypeText Chr(11)
objSelection.Font.Size = “8”
objSelection.Font.italic = true
objSelection.Font.Color = 8421504
objSelection.Font.Bold = False
objSelection.TypeText “This message may contain confidential and/or privileged information. If you are not the address or authorized to receive this for the address, you must not use, copy, disclose or take any action base on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation”
End With
Set objSelection = objDoc.Range()
objSignatureEntries.Add “AD Signature”, objSelection
objSignatureObject.NewMessageSignature = “AD Signature”
objSignatureObject.ReplyMessageSignature = “AD Signature”
objDoc.Saved = True
objword.Quit
Assinar:
Postar comentários (Atom)
Nenhum comentário:
Postar um comentário