DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: urgent!! extracting info from outlook mail

  1. #1
    vinayaka Guest

    urgent!! extracting info from outlook mail


    I am looking for infortmation on how to extract
    sender id, subject and body text from the the attached message
    in outlook mail.

    Scenario is like this:
    I recieve an mail, with attachment containing one more mail.

    I am able to get the from id, to id and subject from the original
    mail.

    here is the piece of code i am using:

    Set ol = New Outlook.Application
    Set olns = ol.GetNamespace("MAPI")

    ' Set MyFolder to the default Inbox.
    Set itm = olns.GetDefaultFolder(olFolderInbox).Items

    MsgFrom = itm.To
    MsgSub = itm.Subject
    MsgBody = itm.Body

    Set objAttach = itm.Attachments.Item(1)

    .......what next to get the info out of the attachment.

  2. #2
    CJ Howorth Guest

    Re: urgent!! extracting info from outlook mail



    > Set objAttach = itm.Attachments.Item(1)
    >
    >.......what next to get the info out of the attachment.


    I haven't worked with this in months, but try
    Const sPATH = "C:\" ' Or whatever path you want to set

    objAttach.SaveAsFile sPATH & att.FileName

    Hope this helps,
    CJ



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center