Jump to content
Fórum Script Brasil
  • 0

VBA Outlook - Obtendo a senha de um formulário


Question

Obter a senha de um formulário do MS Outlook é algo simples, quase trivial (na maioria das vezes), porque o objeto FormDescription, contém informações fundamentais sobre o Form, incluindo a propriedade SENHA. O código VBA para o MS Outlook a seguir mostra o valor da propriedade SENHA numa caixa de mensagem.

Sub GetFormPassword()
    Dim objApp As Application
    Dim objInsp As Inspector
    Dim objFD As FormDescription
    
    Set objApp = CreateObject("Outlook.Application")
    Set objInsp = objApp.ActiveInspector

    If Not objInsp Is Nothing Then

        Set objFD = objInsp.CurrentItem.FormDescription
        MsgBox _
          Prompt:="A senha para o " & _
                  Chr(34) & objFD.MessageClass & _
                  Chr(34) & " formulário é:" & _
                  vbCrLf & vbCrLf & objFD.Password, _
          Title:=".: Recuperando a SENHA"
               
    Else

        MsgBox _
          Prompt:="Por favor, abra um item utilizando " & _
                  "o formulário desejado " & _
                  "execute o código 'GetFormPassword'.", _
          Title:=".: Recuperando a SENHA"
    End If

    Set objFD = Nothing
    Set objNS = Nothing
    Set objApp = Nothing
End Sub

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Cloud Computing


  • Forum Statistics

    • Total Topics
      148865
    • Total Posts
      644861
×
×
  • Create New...