A Mail item is being retrieved.
I Googled this error message and got one hit in ...outlook.program_vba, where, in retrospect, I should have posted this question in the first place. The solution there was a permissions issue, which I do not believe to be the case here. I had already given myself godlike privileges to the email box in question. To verify this, I opened a message, performed an Edit Message and successfully saved the changed message.
"Ken Slovak - [MVP - Outlook]" wrote in message ...
What type of Object is being retrieved? Look for objItem.Class or something like TypeName(objItem) or get the MessageClass of the object to see what's going on.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Bill" wrote in message ...
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