none
Script de assinatura de e-mail RRS feed

  • Pergunta

  • Na minha empresa foi criado um script de logon que insere uma assinatura padrão de e-mail para todos os colaboradores, porem como esse script roda simultaneamente para todos os usuários no momento do login, a mensagem de erro é apresentada.

    Existe um parâmetro ou configuração que podemos fazer para sumir com esse alerta?

     

    quinta-feira, 26 de junho de 2014 15:51

Todas as Respostas

  • Boa tarde Leonardo.

    Consegue postar o script de logon?


    Att, Paulo Rocha MCP | MCDST | MCSA Server 2012

    quinta-feira, 26 de junho de 2014 16:50
  • Leonardo, boa tarde.

    Tente utilizar esse script.

    On Error Resume Next

    Set objSysInfo = CreateObject("ADSystemInfo")

    strUser = objSysInfo.UserName 
    Set objUser = GetObject("LDAP://" & strUser)

    strName = objUser.FullName 
    strTitle = objUser.Title 
    strDepartment = objUser.Department 
    strCompany = objUser.Company 
    strPhone = objUser.telephoneNumber 
    strMobile = objUser.mobile

    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.Bold = True 
    objSelection.Font.Name = "Arial" 
    objSelection.Font.Size = 9 
    objSelection.TypeText strName 
    objSelection.TypeParagraph() 
    objSelection.Font.Style = "Normal" 
    objSelection.Font.Bold = False 
    objSelection.TypeText strTitle 
    objSelection.TypeParagraph() 
    objSelection.TypeText strDepartment 
    objSelection.TypeParagraph() 
    Set colShapes = objDoc.Shapes 
    Set objShape = objSelection.InlineShapes.AddPicture("\\server\sharename\path\filename.bmp") 
    objSelection.TypeParagraph() 
    objSelection.TypeText strCompany 
    objSelection.TypeParagraph() 
    objSelection.TypeText "Tel: " & strPhone 
    objSelection.TypeParagraph() 
    objSelection.TypeText "Mobile: " & strMobile

    Set objSelection = objDoc.Range()

    objSignatureEntries.Add "AD Signature", objSelection 
    objSignatureObject.NewMessageSignature = "AD Signature" 
    objSignatureObject.ReplyMessageSignature = "AD Signature"

    objDoc.Saved = True 
    objWord.Quit


    Jorge Pretel - Microsoft Certified Solutions Expert www.jorgepretel.com.br


    quinta-feira, 26 de junho de 2014 17:38
  • Jorge, boa tarde!

    Aparentemente meu script esta igual... não conseguiu identificar se existe algum campo que no meu esteja errado o que pode estar causando essa msg....

    On Error Resume Next

    Set objSysInfo = CreateObject("ADSystemInfo")

    strUser = objSysInfo.UserName 
    Set objUser = GetObject("LDAP://" & strUser)

    strName = objUser.FullName 
    strTitle = objUser.Title 
    strDepartment = objUser.Department 
    strdescription = objUser.Description 
    strPhone = objUser.telephoneNumber 
    strcompany = objUser.company
    strWeb = objuser.wWWHomePage
    strMobile = objUser.mobile
    strFax = objUser.FacsimileTelephoneNumber

    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.Style = "No Spacing"
    objSelection.TypeParagraph()
    objSelection.Style = "No Spacing"
    objSelection.Font.Bold = True 
    objSelection.Font.Name = "verdana" 
    objSelection.Font.Size = 8
    objSelection.Font.Color = RGB(0,112,192)
    objSelection.TypeText strName 


    objSelection.Font.Name = "verdana" 
    objSelection.Font.Size = 8
    objSelection.Font.Color = RGB(130,130,130)
    objSelection.Font.Bold = false
    objSelection.Font.Italic = True
    objSelection.TypeText " " 
    objSelection.TypeText strdescription 
    objSelection.TypeText ", "

    objSelection.Font.Bold = false
    objSelection.Font.Italic = true
    objSelection.Font.Color = RGB(130,130,130)
    objSelection.Font.Name = "verdana" 
    objSelection.Font.Size = 8
    objSelection.TypeText "empresa Ltda."

    objSelection.TypeParagraph()
    objSelection.Font.Italic = false
    objSelection.Font.Color = RGB(130,130,130)
    objSelection.Font.Bold = false
    objSelection.Font.Name = "verdana" 
    objSelection.Font.Size = 8
    objSelection.Font.Color = RGB(130,130,130)
    objSelection.TypeText "Tel.:"
    objSelection.Font.Color = RGB(130,130,130)
    objSelection.Font.Bold = false
    objSelection.Font.Size = 8
    objSelection.TypeText "+55(11)" & strPhone
    objSelection.TypeText " | "
    objSelection.Font.Name = "verdana" 
    objSelection.Font.Size = 8
    objSelection.Font.Color = RGB(130,130,130)
    objSelection.Font.Bold = false
    objSelection.TypeText "Mobile.:"
    objSelection.Font.Color = RGB(130,130,130)
    objSelection.Font.Bold = false
    objSelection.Font.Size = 8
    objSelection.TypeText "+55(11)" & strMobile

    objSelection.TypeParagraph()
    objSelection.Style = "No Spacing"

    objSelection.Font.Color = RGB(0,0,0)
    objSelection.Font.Color = RGB(28,134,238)
    objSelection.Font.Name = "verdana"
    objSelection.Font.Size = 8
    objSelection.Font.Bold = false
    objSelection.TypeText "www.empresa.com.br"
    objSelection.TypeText " | "
    objSelection.TypeText "facebook.com/empresa"
    objSelection.TypeParagraph()

    objSelection.Font.Color = RGB(25,25,112)
    objSelection.Font.Name = "verdana"
    objSelection.Font.Size = 7
    objSelection.TypeText "empresa sobre tudo....."

    Set objSelection = objDoc.Range()
    objSignatureEntries.Add "AD Signature", objSelection 
    objSignatureObject.NewMessageSignature = "AD Signature" 
    objSignatureObject.ReplyMessageSignature = "AD Signature"

    objDoc.Saved = True 
    objWord.Quit

    quinta-feira, 26 de junho de 2014 17:55
  • Leonardo.

    O problema é a questão que todos usuários logam ao mesmo tempo acredito eu..

    Caso um usuario logue apenas funciona normalmente ?


    Jorge Pretel - Microsoft Certified Solutions Expert www.jorgepretel.com.br

    quinta-feira, 26 de junho de 2014 18:01