Redemption Objects

S

Safal

Trying to access appointment data in a shared calendar with the following
code -

But quite a few things fail -
1)Start/End/Location etc properties are missing
2)Userproperties - Have created a new tab with 4 custom fields - Cant access
the same either
Please help!

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set MyFolder = Session.GetSharedDefaultFolder("Firstname Lastname",9)
NumItems = MyFolder.Items.Count
For Each itm in MyFolder.Items
If itm.Subject <> "" Then MsgBox itm.Subject
If itm.CreationTime <> "" Then MsgBox DateValue(itm.CreationTime)

If itm.Location <> "" Then MsgBox itm.Location
If itm.Start <> "" Then MsgBox DateValue(itm.Start)
If itm.End <> "" Then MsgBox DateValue(itm.End)

Set Prop_Prj=itm.UserProperties("Projects")
If Not Prop_Prj Is Nothing Then
MsgBox "Project-" & itm.UserProperties("Projects").Value
End If
Set Prop_Task=itm.UserProperties("Tasks")
If Not Prop_Task Is Nothing Then
MsgBox "Task-" & itm.UserProperties("Tasks").Value
End If
Set Proj_Type=itm.UserProperties("ProjectType")
If Not Proj_Type Is Nothing Then
MsgBox "Project Type-" & itm.UserProperties("ProjectType").Value
End If
Set Prop_Activity=itm.UserProperties("Activity")
If Not Prop_Activity Is Nothing Then
MsgBox "Activity-" & itm.UserProperties("Activity").Value
End If
next
 
S

Sue Mosher [MVP-Outlook]

From http://www.dimastr.com/redemption/rdo/default.htm:

"There is no RDOAppointmentItem object in this version. While you can still access appointment specific properties using RDOMail.Fields, RDOAppointmentItem will be made available in the next version. "

Custom properties also need to be accessed through the Fields collection, as described at http://www.dimastr.com/redemption/rdo/MAPIProp.htm. See http://www.cdolive.com/cdo10.htm if you need a primer on MAPI property syntax.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Safal

Did not manage to find good results from the link's sent
Here is what i tried
1)Did not manage to get the Location for the appointment data
2)Also could not figure out about "Custom Attributes" (Suppose I have a
custom attribute called Projects how could i fetch the value for the same?)

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set objFolder = Session.GetDefaultFolder(9)
set Items = objFolder.Items
for i = 1 to Items.Count
set Mail = Items.Item(i)

'Item.Subject
PR_SUBJECT = &H0037001E
MsgBox Mail.Fields(&H0037001E)

'Item.Location -> CdoAppt_Location CdoPropSetID1 & "0x8208"
Set objFields = Mail.Fields
MsgBox objFields.Item("{0220060000000000C000000000000046}0x8208").Value
next

A little more help with the code could really help!

-Safal
 
K

Ken Slovak - [MVP - Outlook]

That's CDO 1.21 syntax for the property tag, it won't work with Redemption.
You need to use a more "MAPI" type property tag for that. You can either use
a straight MAPI tag or a DASL tag.

For Location:

Fields("{00062002-0000-0000-C000-000000000046}", &H8208) Or &H1E

Or

Fields("urn:schemas:calendar:location")

For a named property it depends on how you created it, so without that
information it could be anything.

See the examples of how to use MAPI property tags at the Redemption Web
site. If you don't use DASL syntax you must use the GUID, property ID or
name and then Or the result with the property type (PT_STRING8, PT_BINARY,
PT_LONG, etc.).

The OutlookSpy tool, also available at www.dimastr.com provides an easy way
to examine items and determine which property tags to use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top