My app fails when calling Outlook.Namespace.Folders

  • Thread starter Thread starter Ryan H
  • Start date Start date
R

Ryan H

I made a program that reads emails from an Outlook mailbox and does some
stuff and the program works fine.
However, my boss now tells me that the program is to be executed from a
remote computer. I now get the following error when calling the program
remotely:

"Could not complete the operation because the service provider does not
support it. at Outlook.NameSpaceClass.get_Folders()
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp."


Below is the piece of code in the program where the error occurs:

' Create Outlook application
Dim loApp As Outlook.Application = New Outlook.Application

' Get Mapi NameSpace
Dim loNS As Outlook.NameSpace = loApp.GetNamespace("MAPI")

' Error occurs here
Dim loFol As Outlook._Folders = loNS.Folders


How do I fix this?
 
I made a program that reads emails from an Outlook mailbox and does some
stuff and the program works fine.

Programming questions belong in microsoft.public.outlook.program_vba or
..program_addins
 
Back
Top