Save Mapi.Message as MSG

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nabil

    #1

    Save Mapi.Message as MSG

    Hi,

    This is the first time I've posted something on here.

    I've looked around the web for hours and failed miserably. Hopefully
    someone out there would be able to help.

    I'm trying to save an MApi.Message (which represents an email) object
    to my hard drive or a network drive but I'm getting nowhere. I know I
    can use Redemption to do this but I'm trying to avoid 3rd party
    products (especially ones I have to pay for)

    Here's my code

    Dim oSession As New MAPI.Session
    Dim oFolder As MAPI.Folder
    Dim oMessages As MAPI.Messages
    Dim oMessage As MAPI.Message
    Dim strEmailAccount As String = "Exchange_Email _Account"
    Dim strExchangeServ erName As String = "exchange04 "

    Dim profile As Object = Nothing
    Dim strProfile As String = strExchangeServ erName & vbLf &
    strEmailAccount

    oSession.Logon( "", , , False, , True, strProfile)

    ' Get Inbox.
    oFolder = oSession.Inbox

    ' Get Messages collection.
    oMessages = oFolder.Message s

    ' Get the second email
    oMessage = oMessages.Item( 2)

    ' Now just saving it should be easy??????????? ?????

    -------------------------------------------

    Your help will be greatly appreciated.

    Thanks
  • Nabil

    #2
    Re: Save Mapi.Message as MSG

    Let me put the question slightly differently :o)

    Is it possible?

    Thanks

    Comment

    Working...