Re-Installed Outlook 2003 - Now Get "An Object Can Not Be Found" E

G

Guest

Hello.

I have a VB.Net program that monitors Outlook for emails within a group's
mailbox
(ppodata). My server crashed last week and I had to re-install Outllook 2003
with SP2. My .Net program worked fine until the re-install. When I now start
the .Net program I see Outlook opening and then my program stops running. I
placed some "write to a log file" statements within the code to isolate the
issue and the program is blowing up on line 4 of my code.

I don't understand why I'm getting this error message
"The operation failed. An object could not be found. Source of error:
Microsoft
Office Outlook " Main. PROGRAM HALTED".

It found the Outlook object but it's having a problem when I'm setting the
Outlook.MAPIFolder to oNS.Folders("ppodata").

Here's my code:
Dim oOutlook As Outlook.Application
oOutlook = New Outlook.Application
Dim oNS As Outlook.NameSpace = oOutlook.Session

*********** HERE's WHERE IT BLOWS UP ************
Dim oInbox As Outlook.MAPIFolder = oNS.Folders("ppodata")

Dim oItems As Outlook.Items = oInbox.Folders("Inbox").Items
Dim oItem As Outlook.MailItem

Any suggestion will be greatly appreciated!

By the way, it works fine on my PC.
Only on the production server does it blow up :-(.

Rita
 
S

Sue Mosher [MVP-Outlook]

Do you have a .pst file in the current Outlook profile with a display name of "ppodata"? If not, that would explain why you'd get an error on that statement. Iterating the Namespace.Folders collection could be revealing.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thanks for your response Sue.
I found a "Mailbox - PPOData.pst" in D:\Outlook (Outlook was installed on
the D: drive).
I copied the file and renamed it PPOData.pst but still got the same error.
I also tried renaming the copied file to Personal.pst but that didn't work
either.

I'm wondering if the issue could be that the .pst is on the D: drive - but
the install should allow for that.
 
G

Guest

Sue - you are a life saver!!!

I found a "Mailbox - Ppodata.pst" file and changed the program to
Dim oInbox As Outlook.MAPIFolder = oNS.Folders("Mailbox - Ppodata")
and it worked !!

Thank you so much. I needed it for our production server that has a large
volume
of emails that get processed automatically.
 
S

Sue Mosher [MVP-Outlook]

As you found out, renaming a .pst file does not affect the display name, which is what Outlook users in Namespace.Folders. Glad you got it working.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top