[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Use Outlook COM objects from shared profile/Install MAPI

Posted on 2002-06-06
9
Medium Priority
?
512 Views
Last Modified: 2010-04-04
System: Windows 2000, Exchange 2000, Outlook XP (2002)

I have made a program that accesses an Outlook public appointments folder by creating an Outlook.Application OLE object.  It allows the user only to add appointments at certain times and 1 hour blocks.  It works just fine under my profile.

My problem now is that there is a group of about 50 users that have a shared mandatory Windows profile and do not have an Outlook profile (using a group policy, Outlook.exe is blocked).  I somehow need to be able to access the public folder anyway.

Possible solution #1:
Create a "dummy" Exchange 2000 account (by creating a new user in Active Directory) that everyone uses.  Set it up for the shared profile.

Problem:
olFolder := olNameSpace.Folders('Public Folders').Folders('All Public Folders').Folders('Appts');
gives a "You do not have permission to log on" error, even though I gave the "dummy" user "Owner" permissions.


Possible solution #2:
Use MAPI.Session instead of Outlook.Application.  This will provide the ProfileInfo parameter in the olNameSpace.Logon method (look at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q195662).

Problem:
During runtime, olApp := CreateOleObject('MAPI.Session'); gives the error "Invalid class string".  I have installed Outlook 2002 and set up an Exchange account, which should have installed MAPI, but apparently it hasn't.  I've searched all over the web and can't find any other way to install it (or make sure it is).

Possible solution #3:
Do you have any? :)

So in summary, I need to somehow install MAPI so "MAPI.Session" will work, or fix "You do not have permission to log on".

Any help is appreciated.  I am out of ideas right now.
0
Comment
Question by:NelsonR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 4

Expert Comment

by:StevenB
ID: 7061064
 To use The MAPI.Session Object I'm pretty sure you need to have CDO installed. The default install of Outlook does not install CDO if I recall correctly, you have to select it specifically. http://www.cdolive.com/ is a great site for CDO and MAPI info.

  Hope this helps somewhat.

  Steven
0
 

Author Comment

by:NelsonR
ID: 7062126
Where do you select it specifically?  I couldn't find it anywhere.  Also, cdolive is outdated :(
0
 
LVL 4

Expert Comment

by:StevenB
ID: 7063904
 On your Office 2000 CD select "Add or Remove Features". When presented with the options dropdowns make sure that "Microsoft Office -> Microsoft Outlook for Windows -> Collaboration Data Objects" is selected, by default it is not. This should give you access to CDO programming functionality.

  The http://www.cdolive.com/ site is undergoing upgrades, but the old content is avbailable at http://www.cdolive.com/start.htm in particular the CDO help file available at http://www.cdolive.net/download/cdo.zip is a great resource.

  Regards,

  Steven.
 
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:NelsonR
ID: 7066946
I figured out how to install CDO and finally was able to log on, etc.  Now that I ran the program from the shared user's account I got a "You do not have permission to log on. [Microsoft Exchange Server Information Store - [MAPI_E_FAILONEPROVIDER(8004011D)]]." error.. :(

Here's my code:
------------------
 cdoSession := CoSession.Create;
 cdoSession.Logon('', '', false, true, 0, true, 'Mail' + #10 + 'OutlookAccess');
 cdoPublicStore := cdoOpenFolder(cdoSession.InfoStores.Item[1].RootFolder.Folders, 'All Public Folders');
 cdoACNAppt := cdoOpenFolder(cdoOpenFolder(cdoPublicStore.Folders, 'ACN').Folders, 'Appointments').Messages;

 cdoMessage := cdoACNAppt.GetFirst;
 ShowMessage(cdoMessage.Subject);

--------------

function TfACNAppts.cdoOpenFolder(Folders: OleVariant; FolderToOpen: String): OleVariant;
var i: Integer;
begin
 for i := 1 to Folders.Count do
  if Folders.Item[i].Name = FolderToOpen then
  begin
   Result := Folders.Item[i];
   break;
  end;
end;
--------------

Note the Logon() function that has:
'Mail' + #10 + 'OutlookAccess'

I am connecting to the server named 'Mail' to the account 'OutlookAccess', so it shouldn't be using the local profile.  Why does it work for me (domain admin) and not them (domain users only)?
0
 

Author Comment

by:NelsonR
ID: 7067021
I might have solved it. I just gave "Everyone" full rights to the "OutlookAccess" mailbox.. It now logs in.. I am getting another error later on which I wasn't getting before, but I should be fine.
0
 

Author Comment

by:NelsonR
ID: 7067166
Hmm.. OK, so it logs in, but now it can't find the "ACN" folder (Appointments is a subfolder) even though 'OutlookAccess' has Owner rights to it
0
 

Author Comment

by:NelsonR
ID: 7070956
So no one knows/has done this?  I've tried Outlook COM objects, MAPI, CDO 1.21, CDOEX, etc. can't figure it out.
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9010474
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ and Refund

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 0 total points
ID: 9101878
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question