![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Tags: avoid, dialog, login |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I'm trying to automate creating a PST and placing some emails in it
from VC++. I shouldn't need to log into an Exchange server, as I'm not sending or receiving any email. I just want to create a PST file. I'm not calling olNs.Logon, but it's still popping up anyways. Unfortunately, I cannot get it to avoid showing the login dialog, unless Outlook was already running and I was already logged in, or unless I switch Outlook to offline. If I could programatically set it to offline, that would solve my problem. CApplication olApp; COleException e; if( !olApp.CreateDispatch("Outlook.Application", &e) ) { return; } CNameSpace olNs(olApp.GetNamespace("MAPI")); olNs.AddStoreEx(COleVariant(CString("C:\\plhtest.p st")), 2); ... (Create MailItem objects and add to newly created store) ... Is there any way to solve this? Thanks, Phillip Hellewell |
| Ads |
|
#2
|
|||
|
|||
|
If you need to add a PST store to a profile without actually logging to that
profile, you will need to use the profile API - see numerous posts on this subject: http://www.google.com/search?hl=en&q...guremsgservice plugProfMan (comes with the distributable version of Redemption) will let you do that in a dozen lines of code or less - http://www.dimastr.com/redemption/profiles.htm#example4/plug Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool wrote in message ups.com... I'm trying to automate creating a PST and placing some emails in it from VC++. I shouldn't need to log into an Exchange server, as I'm not sending or receiving any email. I just want to create a PST file. I'm not calling olNs.Logon, but it's still popping up anyways. Unfortunately, I cannot get it to avoid showing the login dialog, unless Outlook was already running and I was already logged in, or unless I switch Outlook to offline. If I could programatically set it to offline, that would solve my problem. CApplication olApp; COleException e; if( !olApp.CreateDispatch("Outlook.Application", &e) ) { return; } CNameSpace olNs(olApp.GetNamespace("MAPI")); olNs.AddStoreEx(COleVariant(CString("C:\\plhtest.p st")), 2); ... (Create MailItem objects and add to newly created store) ... Is there any way to solve this? Thanks, Phillip Hellewell |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| a program is trying to access e-mail address - how do I avoid this | marie | Outlook and VBA | 1 | August 4th 06 05:00 AM |
| avoid drag and drop calendar | Dean | Outlook - Calandaring | 1 | June 23rd 06 01:24 PM |
| Outlook 2003, RPC/HTTP, no Login dialog | dkeirns | Outlook - Installation | 0 | June 6th 06 11:47 PM |
| Bounced back messages.... can I avoid? | Dean | Outlook - Using Contacts | 1 | March 29th 06 09:40 AM |
| Avoid duplication when sending to multiple groups | pwrichcreek | Outlook Express | 3 | January 22nd 06 05:11 PM |