![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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 |
#4
|
|||
|
|||
![]()
Well, I don't have any answers for you then. Are you positive that you are
getting a valid MAPIFolder object and Items collection? Can you retrieve the Items.Count? It isn't possible that the item could be encrypted or signed is it? -- 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 ... 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. |
#5
|
|||
|
|||
![]()
The collection appears to be valid.
The message is a plain text email generated by our website. "Ken Slovak - [MVP - Outlook]" wrote in message ... Well, I don't have any answers for you then. Are you positive that you are getting a valid MAPIFolder object and Items collection? Can you retrieve the Items.Count? It isn't possible that the item could be encrypted or signed is it? -- 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 ... 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. |
#6
|
|||
|
|||
![]()
What's the exact error you get, I don't believe you posted it.
-- 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 ... The collection appears to be valid. The message is a plain text email generated by our website. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
error opening .xnk file in public folder | John | Outlook - General Queries | 0 | August 9th 06 02:55 PM |
activate contact folder from public folder with "show this folder as email address book using a prf file | Frankie K. | Outlook - Using Contacts | 7 | July 25th 06 06:37 PM |
Code not working to a shared mailbox | Wanda | Outlook - Using Forms | 1 | June 23rd 06 07:07 PM |
Mailbox restrictions not working? | Chris Weber | Outlook - General Queries | 0 | May 2nd 06 08:24 PM |
Error when moving mailbox | rp | Outlook - Installation | 2 | April 25th 06 09:09 PM |