>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