473,386 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

My app fails when calling Outlook.Namespace.Folders

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?
Oct 6 '08 #1
2 3618
A couple of things to look at here:
1.
Outlook requires authentication before being called. If you don't
impersonate or create credentials, the process running your application will
be used to present credentials to Outlook. Those credentials must be able to
authenticate against outlook. In your first instance, the logged on user is
being used to authenticate outlook by default so you likely won't see any
issue.

2.
You could also be running into the Outlook object model guard.

3.
The supported technology for interacting with outlook is WebDav.

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Ryan H" <rh******@smci.comwrote in message
news:#q**************@TK2MSFTNGP02.phx.gbl...
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?
Oct 7 '08 #2
"Ryan H" <rh******@smci.comwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
>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
--
Brian Tillman [MVP-Outlook]

Oct 7 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John | last post by:
Hi I would like my vb app to work with outlook 2000 and above. What is the method to get the appropriate reference(s) in my vb app? Thanks Regards
3
by: John | last post by:
Hi I am trying to access outlook contacts folders and delete the contacts that do not contain a certain category value in the categories field. I have written the below code but am stuck with...
7
by: Chris Thunell | last post by:
I'm trying to loop through an exchange public folder contact list, get some information out of each item, and then put it into a vb.net datatable. I run though the code and all works fine until i...
3
by: Lars Netzel | last post by:
I need to know if I can look for "Inbox" or as in Swedish "Inkorgen"... or can one asume I that the Inbox has a special index if I loop thru the folders? /Lars Netzel
2
by: Ecohouse | last post by:
I've written a function to check emails in Outlook using Access which works. But I need to be able to have it work for different version of Outlook. I'm using Outlook 2002 and I need to also work...
5
by: Arno R | last post by:
Hi all, I need to get at specific (shared) agenda-data from MS outlook 2003. I need every day to get the scheduled 'appointments' for some rooms to Access. In Access I will show the...
1
NarenMCA
by: NarenMCA | last post by:
Hi, The below code in MS Outlook gives me the names of folders in "public folders". I am looking forward to get all the subfolders and files in "Public folders" Please assist me in this. ...
2
by: Ryan H | last post by:
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....
0
by: printline | last post by:
Hello I have the following macro for outlook: Dim oApp As Application Dim oNS As NameSpace Dim oMsg As Object Dim bDoAction As Boolean Dim oAttachments As Outlook.Attachments
4
by: infomage27 | last post by:
I have tried scripting this with rules and VBA, now trying with C# but still failing. (code is exploratory, so please excuse the terribleness) maybe someone here will show me the error of my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.