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