My app fails when calling Outlook.Namespace.Folders

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

Brian Tillman [MVP - Outlook]

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
 

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