Results 1 to 15 of 15

Thread: [RESOLVED] MAPISession.SignOn Not Setting SessionID Win 7

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2009

    Resolved [RESOLVED] MAPISession.SignOn Not Setting SessionID Win 7

    So I have some MAPI code that work Just the way I want it to on XP and dosn't work at all on Windows 7. ( I wish I could find the time to just port the whole thing over to .net but I don't)
    EDIT For any one from the future reading this is the wrong way to go about sending to the desktop client. See post #15. Use Edanmo's code plus my tweak.
    ' DFIMAPISession is a MAPISession on the form (MSMAPI32.oxc)
    'DFIMAPIMessages is a MAPIMessage on the form.
    'I develop on a Win 7 No Sp1
    Private Sub Command3_Click()
            Let DFIMAPISession.DownLoadMail = False
            'Sign on Session
            If (DFIMAPISession.SessionID = 0) Then
                Call DFIMAPISession.SignOn 'Runs fine
            End If
            With DFIMAPIMessages
                .SessionID = DFIMAPISession.SessionID 'Runst fine but SessionID = 0
                .Compose' Throws Mapi failure: Valid session id does not exist '32053'
                .AddressResolveUI = False
                .MsgSubject = "This is a subject."
                .MsgNoteText = "This is a body."
                .RecipIndex = 0
                .RecipType = 1
                .RecipAddress = "smtp: ron82@gmal.co"
                .RecipDisplayName = "smtp: ron82@gmal.co"
                .Send True
            End With
    End Sub
    I've Also Tried this http://support.microsoft.com/kb/163216 but it seems geared toward just outlook and still doesn't work at all on win 7.

    What I'm trying to accomplish is an emulation of right Click Sendto > Mail Recipient but from my VB6 application. I currently am using a light CDO send mail form but more and more customers are asking that my program output be sent to their mail client.

    I've also looked at http://www.codeproject.com/Articles/...ck&fr=26#xx0xx


    Thank you
    Last edited by rhahn; Mar 5th, 2012 at 05:40 PM.

Tags for this Thread

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