Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - Using Forms (http://www.outlookbanter.com/outlook-using-forms/)
-   -   Redemption Objects (http://www.outlookbanter.com/outlook-using-forms/36415-redemption-objects.html)

Safal December 29th 06 11:06 AM

Redemption Objects
 
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

Sue Mosher [MVP-Outlook] December 30th 06 04:05 PM

Redemption Objects
 
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Safal" wrote in message ...
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


Safal January 3rd 07 06:31 AM

Redemption Objects
 
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

"Sue Mosher [MVP-Outlook]" wrote:

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Safal" wrote in message ...
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



Ken Slovak - [MVP - Outlook] January 3rd 07 03:18 PM

Redemption Objects
 
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.

--
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


"Safal" wrote in message
...
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




All times are GMT +1. The time now is 09:26 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com