Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - MAPI and calendars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MAPI and calendars

 Post Reply Post Reply
Author
Message
Fabrice View Drop Down
Groupie
Groupie


Joined: 05 December 2006
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabrice Quote  Post ReplyReply Direct Link To This Post Topic: MAPI and calendars
    Posted: 16 February 2009 at 8:46am
Hi !
 
Is there a way to open a calendar of another person with the fonction "SetDataProvider" ?

If yes, what is the connection string ?

 

Sample :

I would find a way to open another calendar :

CalendarControl.SetDataProvider("Provider=MAPI;nickname=henry");

 
Thanks
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2009 at 9:15pm
MAPI provider is part of Outlook. How you get Outlook-protected data from another account? I am not sure that this is easy or possible!?
Back to Top
Fabrice View Drop Down
Groupie
Groupie


Joined: 05 December 2006
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabrice Quote  Post ReplyReply Direct Link To This Post Posted: 19 February 2009 at 4:12am
Today, each user can read all calendars on exchange server. Why cannot I do it with the ActiveX ?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2009 at 7:05pm
You right - if your users share their calendars with others
Back to Top
Fabrice View Drop Down
Groupie
Groupie


Joined: 05 December 2006
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabrice Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2009 at 4:42am
Yes, all users share their calendars with others.
 
So, what's the connection string to connect another calendar ?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2009 at 10:51am

"Provider=MAPI;Data Source=" & Path & "\Application Data\Microsoft\Outlook\outcmd.dat"

Just specify path to other user's outlook data e.g. "C:\Documents and Settings\YourUser\Local Settings"

Back to Top
Fabrice View Drop Down
Groupie
Groupie


Joined: 05 December 2006
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabrice Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2009 at 11:35am
I'm afraid that it can't work. The connection string doesn't work with a path like \\server\sharefolder\...
 
Another idea ?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2009 at 12:02pm

Could you give us error code you get in this case please.

Could you browse to same url (\\server\sharefolder\... )
May be this is network setup/access problem?
 
P.S. Looks like this is a question to your network admin
Back to Top
Fabrice View Drop Down
Groupie
Groupie


Joined: 05 December 2006
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabrice Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2009 at 12:07pm
No error in this case, but it always open my own outlook calendar ...
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2009 at 12:48pm
Please explain: No error in this case, but it always open my own outlook calendar
Do you access network drive or local drive?
Back to Top
Fabrice View Drop Down
Groupie
Groupie


Joined: 05 December 2006
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabrice Quote  Post ReplyReply Direct Link To This Post Posted: 24 February 2009 at 4:13am
My own calendar is on a local drive. I don't have to write the path of my ressource in the connection string, simply : CalendarControl.SetDataProvider("Provider=MAPI");
 
Others calendars are somewhere on the network, I don't know where, and I think that's it's possible to connect to them like Outlook do.
 
Every connection string I've tested which starts with ("Provider=MAPI...") connect every time my own calendar. I've done a test with your sample "Provider=MAPI;Data Source=" & Path & "\Application Data\Microsoft\Outlook\outcmd.dat", where "Path" is a network path, but it doesn't work too.
 
Is anybody success to connect a calendar of another person with the ActiveX ?
Back to Top
Fabrice View Drop Down
Groupie
Groupie


Joined: 05 December 2006
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabrice Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2009 at 6:04am
Is there anybody ?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2009 at 4:37pm
I made successfull test with MAPI today. You need to make Outlook to be your default program for e-mail, contact and Calendar (check Outlook options!) and RUN Outlook while you running our MFC or VB Calendar.
Open in Outlook remote file \\MyServer\MyFolder\MyOutlook.pst - Outlook will read it and create extra PersonalFolders tree item.
You can rename it as you wich - e.g. YourPersonalFolders
 
use in VB Load frmMain Private Sub Form_Load() function line:
OpenProvider cjCalendarData_MAPI, "Provider=MAPI;Data Source=\\MyServer\MyFolder\MyOutlook.pst"
 
Now you can see your event and modify it from MFC or VB app
Btw - I am running VPN, I am in Montreal, \\MyServer\MyFolder\MyOutlook.pst - in USA
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Additional MAPI parameters are supported for data provider connection string:
 mapiProfileName= <as string>
 mapiPassword= <as string>
 mapiFlags=  <as hex number, like 0x001>
EXAMPLE:
 strConnEx = "Provider=MAPI; mapiProfileName=Outlook2; mapiPassword =Brawn256; mapiFlags=0x00000012"
if you do not specify any parameter - default values will be used:
 NULL for ProfileName and Password
 and MAPI_LOGON_UI for Flags
Below are values which can be used for mapiFlags.
See also documentation for MAPILogonEx function.
MAPI_LOGON_UI   0x00000001 /* Display logon UI     */
MAPI_NEW_SESSION  0x00000002 /* Don't use shared session   */
MAPI_ALLOW_OTHERS  0x00000008 /* Make this a shared session  */
MAPI_EXPLICIT_PROFILE 0x00000010 /* Don't use default profile  */
MAPI_EXTENDED   0x00000020 /* Extended MAPI Logon    */
MAPI_FORCE_DOWNLOAD  0x00001000 /* Get new mail before return  */
MAPI_SERVICE_UI_ALWAYS 0x00002000 /* Do logon UI in all providers  */
MAPI_NO_MAIL   0x00008000 /* Do not activate transports  */
MAPI_PASSWORD_UI  0x00020000 /* Display password UI only   */
MAPI_TIMEOUT_SHORT  0x00100000 /* Minimal wait for logon resources */
(this is a copy from old - 2008 - answer)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.