Signature not appearing in MAPI emails

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have inherited the following code to send email:
--------------------------------------------------------
Private Sub btnMail_Click()

On Error GoTo ComposeErr
Dim strMessage As String
Dim objMessage As Object

Me.ctlMAPISession.UserName = gUserID
Me.ctlMAPISession.Password = gUserPassword
Me.ctlMAPISession.SignOn

Me.ctlMAPIMessage.SessionID = Me.ctlMAPISession.SessionID
Me.ctlMAPIMessage.Compose
Me.ctlMAPIMessage.MsgIndex = -1
Me.ctlMAPIMessage.RecipDisplayName = Trim(Me.txtemail.Text)
Me.ctlMAPIMessage.Send True

------- this is where Outlook is waiting for the user to compose the message
and hit “sendâ€.

Me.ctlMAPISession.SignOff
Exit Sub

ComposeErr:
' MsgBox Str(Err.Number) + " " + Err.Description
MsgBox Err.Description
Resume Next

End Sub
-------------------------------------------------------------------------
When the user presses the button to invoke this method, no signature appears
on the message and the user isn't able to switch to the Outlook window.

Does anyone know how to make the signature appear? Is this just old
technology?
 
It's just plain old technology. If you want the user's automatic signature to appear, you probably would have to throw that code out and use actual Outlook object automation.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top