Thread: RDOSession
View Single Post
  #1  
Old January 17th 08, 12:36 PM posted to microsoft.public.outlook.program_addins
CK
external usenet poster
 
Posts: 33
Default RDOSession

Hi Ken,

I tried RDOSession but the oFolder.Fields(&H30080040) value is = Empty.
Then i tried to change the name of the contact default folder to make sure
the folder really changed. Try again but oFolder.Fields(&H30080040) still
empty.

By the way, you commented that:

"use Application only in Outlook VBA, otherwise get Application object, then
get NameSpace."

Why Application only in Outlook VBA? I tried Application in VB6 Com Add-In
and it seems to work fine.

Thanks.

"Ken Slovak - [MVP - Outlook]" wrote:

I'd probably use RDOSession myself:

Dim oSession As Redemption.RDOSession
Dim oFolder As Redemption.RDOFolder
Dim lastMod As Date

Set oSession = CreateObject("Redemption.RDOSession")
' use Application only in Outlook VBA, otherwise get Application object,
then get NameSpace.
oSession.MAPIOBJECT = Application.Session.MAPIOBJECT
Set oFolder = oSession.GetDefaultFolder(olFolderContacts)
lastMod = oFolder.Fields(&H30080040)

Note that lastMod will be in UTC and not in local time. Use MAPIUtils to do
the conversion using the HrGMTToLocal() method.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


Ads