View Single Post
  #1  
Old October 6th 06, 07:24 PM posted to microsoft.public.outlook.program_forms
Bill
external usenet poster
 
Posts: 31
Default Error when working on mailbox vs public folder

Running Outlook 2003 SP2 on Win XP SP2/ Exchange Server 2003

We receive product review requests via email to an Exchange account. Requests are validated manually for certain criteria, which are found within the email. I'm trying to automate that validation process by parsing some dates and numbers in the email. This code is working OK in test, which I'm doing in a public folder where I copied all of the emails to. When I run the code in the mailbox it errors on the final line below:

Sub ValidateRequests()
Dim objApp As Outlook.Application
Dim objFolder As Outlook.MAPIFolder
Dim objItem As Object
Dim strMsg As String

Set objApp = CreateObject("Outlook.Application")
Set objFolder = objApp.ActiveExplorer.CurrentFolder

For Each objItem In objFolder.Items
strMsg = objItem.Body

The error is:

Thanks for any ideas.

Bill Le May
Ads