Results 1 to 3 of 3

Thread: MAPI

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    I am trying to use MAPI to send an email via my VB app. We use GroupWise here and I believe this the root of my problem. Every time I try to run the functionit gets to the mapilogon.UserName and then crashes stating "Object not found". I setup a new profile in the control panel and the specified that in the username and I still get the same error message. Does anyone have any suggestions? Here is my code..

    Private Sub email()
    Dim strUserId As String
    Dim strPassword As String
    Dim strfilename As String
    Dim strfilepath As String

    Screen.MousePointer = vbHourglass

    strfilename = "test.pdf"
    strfilepath = "h:\"

    mapilogon.UserName = "********"
    mapilogon.Password = "*******"

    mapilogon.SignOn

    Do While mapilogon.SessionID = 0
    Loop
    MAPIMessages1.SessionID = mapilogon.SessionID
    MAPIMessages1.Compose
    MAPIMessages1.RecipDisplayName = "Digital Sender"
    MAPIMessages1.AddressResolveUI = True
    MAPIMessages1.ResolveName
    MAPIMessages1.RecipAddress = "smtp:[email protected]"
    MAPIMessages1.MsgSubject = "Test" & vbCrLf
    MAPIMessages1.MsgNoteText = "Test"
    MAPIMessages1.AttachmentPosition = Len(MAPIMessages1.MsgNoteText) - 1
    MAPIMessages1.AttachmentPathName = strfilepath & strfilename
    MAPIMessages1.Send False
    mapipgon.SignOff
    MsgBox "File Sent to specified person"

    Screen.MousePointer = vbNormal
    End Sub

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    Any suggestions????????

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    I am desperat people, any suggestions?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width