Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading the subject of the mails in an inbox directory
Message
From
27/10/2002 04:04:28
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00715200
Message ID:
00715851
Views:
20
>We are always sending an ASCII file to some custormer, the customer system sends us back an email with just a subject somethng like this
>
>"807 System message, shipment # HKA222 was processed successfully"
>
>What I need to do is read the Inbox folder that containes this messages, substract the shipment # that was processed successfully and then update the table of the shipments just to avoiding reprocess the shipment again.
>
>I ma very new to Outlook express automation, so I'm asking for some sample code to do so, anybody?

Here's an example. I have a folder called "UT" under my Inbox. The example shows how to create an outlook object, and then retrieve emails in a particular forlder and read their subject.
CLEAR 

LOCAL ;
loOutlook as outlook.application, ;
loItem, ;
loInbox, ;
loNameSpace

loOutlook = CREATEOBJECT("outlook.application")
loNameSpace = loOutlook.APPLICATION.GetNamespace('MAPI')
loInbox = loNameSpace.Folders(1).Folders('InBox')
loInbox = loInBox.Folders('UT')
loInbox.Items.SORT('To')
FOR EACH loItem IN loInbox.Items
	?loItem.Subject
NEXT lni
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform