A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Error when working on mailbox vs public folder



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 6th 06, 08: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
  #2  
Old October 6th 06, 09:22 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Error when working on mailbox vs public folder

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  
Old October 6th 06, 10:03 PM posted to microsoft.public.outlook.program_forms
Bill
external usenet poster
 
Posts: 31
Default Error when working on mailbox vs public folder

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  
Old October 9th 06, 04:02 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Error when working on mailbox vs public folder

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  
Old October 9th 06, 06:18 PM posted to microsoft.public.outlook.program_forms
Bill
external usenet poster
 
Posts: 31
Default Error when working on mailbox vs public folder

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  
Old October 9th 06, 10:31 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Error when working on mailbox vs public folder

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 11:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.