Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Rob Laye
  Where is Rob Laye?
 United Kingdom
 Rob Laye
 To: Andy van Steijn
  Where is Andy van Steijn?
 Den Haag
 Andy van Steijn
Subject: RE: Read Messages with MAPI
Thread ID: 4703 Message ID: 15853 # Views: 3 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, October 2, 2002 12:07:32 PM         

> Sample of what I use to get email attachements form the mailbox
> myOlApp = CREATEOBJECT("Outlook.Application")
> myNameSpace = myOlApp.GetNameSpace("MAPI") &&Gets current MAPI Session
> myNameSpace.LogOn("FC","") &&In this case,FC is the Windows Login Name, Password=blank
> myFolder = myNameSpace.GetDefaultFolder(6) &&Gets the Inbox
> FOR i = 1 TO myFolder.Items.Count &&Loops through all the inbox messages
> myItem = myFolder.Items(i)
> IF myItem.Subject = "You can use this if there is a particular subject you expect"
> IF myItem.Unread() AND myItem.Attachments.Count > 0 &&Unreadw/Attachment
> myItem.Attachments.Item(1).SaveAsFile("K:\"+myItem.Attachments.Item(1).FileName)
> > Hello, Andy

I found your code and it does almost what I need is there anyway to pass back to outlook
thatthe message has been read or just delete it



Read Messages with MAPI Posted by Sandu Sorin @ 10/30/2001 2:59:36 PM
RE: Read Messages with MAPI Posted by Andy van Steijn @ 10/30/2001 4:00:57 PM
RE: Read Messages with MAPI Posted by Rob Laye @ 10/2/2002 12:07:32 PM
RE: Read Messages with MAPI Posted by Erik Gomez @ 10/2/2002 2:00:09 PM
RE: Read Messages with MAPI Posted by aktayal @ 10/5/2002 3:46:28 PM