Results 1 to 3 of 3

Thread: Capture data from Outlook after ending a MAPI email

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Location
    Milton Keynes, UK
    Posts
    5

    Question Capture data from Outlook after ending a MAPI email

    Hi folks,

    I've been driving myself nuts trying to find out how to retreive the data from a user composed email created using simple MAPI and was hoping somone could give me a clue.

    I basically have the code shown below and I'd like to capture RecipAddress, MsgSubject and MsgNoteText once the send button in Outlook 2000 is pressed.


    MAPISession1.SignOn
    MAPIMessages1.SessionID = MAPISession1.SessionID
    MAPIMessages1.Compose
    MAPIMessages1.Send True

    'capture and store RecipAddress, MsgSubject and MsgNoteText

    MAPISession1.SignOff


    Anyone able to give me a pointer?

  2. #2
    Lively Member AjayKumar's Avatar
    Join Date
    Nov 2003
    Location
    Noida
    Posts
    94

    Mapi

    You can use following Code:-

    MAPISession1.SignOn
    With MAPIMessages1
    .SessionID = MAPISession1.SessionID
    .Compose
    .RecipAddress = "[email protected]"
    .ResolveName
    .MsgSubject = "My Subject"
    .MsgNoteText = Text1.Text
    .AttachmentIndex = 0
    .AttachmentPosition = 0
    .AttachmentPathName = "c:\CDKEY.txt"
    .Send
    End With
    MAPISession1.SignOff
    HI ITs exciting!!!!!

  3. #3
    Addicted Member Cimperiali's Avatar
    Join Date
    Oct 2002
    Location
    Milan, Italy, Europe
    Posts
    188

    once the send button in Outlook 2000 is pressed

    >the send button in Outlook 2000 is pressed

    You have to get when the send button is pressed.
    Thus you need to automate outlook (I may be wrong,
    but I think you will go nowhere with mapisession and
    mapicontrol) or to build a program that will try to spy the
    windows that are out, or add an Add-in to outlook....
    Special thanks to some wonderful people,
    such as Lothar the Great Haensler, Aaron Young,
    dr_Michael, Chris Eastwood, TheOnlyOne ClearCode....

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