Re: Deleted Item not in 'deleted' folder?
From: Ken Slovak - [MVP - Outlook] (kenslovak_at_mvps.org)
Date: 10/12/04
- Next message: Ken Slovak - [MVP - Outlook]: "Re: Outlook VBA / Macros in network envoronment"
- Previous message: Wanda: "Function Items"
- In reply to: Tagman: "Re: Deleted Item not in 'deleted' folder?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 12 Oct 2004 10:40:27 -0400
Again, you will get errors trying to instantiate a MAPI.Session if CDO 1.21
is not installed. It's optional and often is not installed.
There are many examples of various logons using CDO 1.21 at
www.cdolive.com/cdo5.htm.
A piggy-back logon won't do you any good at all if Outlook isn't running.
Here's an example of that:
Dim oCDO As MAPI.Session
Set oCDO = CreateObject("MAPI.Session")
oCDO.Logon "", "", False, False
For a logon using profile information you will need to know the mailbox and
server names and have a Windows logon with permissions on that mailbox. Then
you can use something like this:
Dim oCDO As MAPI.Session
Dim strProfileInfo As String
Set oCDO = CreateObject("MAPI.Session")
strProfileInfo = "<Your Servername>" & vbLf & "<Your Mailbox>"
oCDO.Logon "", "", False, True, 0, False, strProfileInfo
Or you can use the profile name if you know it:
oCDO.Logon "<Profile Name>", "", False, True, 0
Profile names can be found under HKCU\Software\Microsoft\Windows
NT\CurrentVersion\Windows Messaging Subsystem\Profiles. The default profile
is listed in a string value in that key named DefaultProfile.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Tagman" <Tagman@no_spam> wrote in message news:efGj93AsEHA.2776@TK2MSFTNGP14.phx.gbl... > Ken Slovak - [MVP - Outlook] wrote: > > First if you are going to use CDO 1.21 you have to make sure it's installed. > > It's an optional installation for Outlook 2000 and later. > > > > Second, if Outlook is running you can use what's called a piggy-back logon > > to the Outlook session. If Outlook is not running you would need to log into > > a CDO session using the profile information for the Outlook profile you want > > to use. If the user is working with Outlook 98 or 2000 in Internet only mode > > you may have problems since the MAPI there is limited. > > > Do you have any example on how to do the piggy-back logon and how to > find the outlook profile available in the local machine? from the logon > parameters... there are many many need to be input, but I don't know > where to find those information for the current login user. > > > If Outlook is not the default mail handler you can still use CDO 1.21 but > > you have to know all the details of logging into a profile that will access > > the PST file you want. > > > Do you know where to find those details for logging into the profile? > when I do the call "new MAPI.session" , the warning window popup > immediately. Do you have any example about this issue? > > Regards, > Tony
- Next message: Ken Slovak - [MVP - Outlook]: "Re: Outlook VBA / Macros in network envoronment"
- Previous message: Wanda: "Function Items"
- In reply to: Tagman: "Re: Deleted Item not in 'deleted' folder?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|