A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Migration from CDO 1.2 to OOM2007: field/property handling???



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old December 11th 07, 02:22 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Migration from CDO 1.2 to OOM2007: field/property handling???

There's no migration information that I've ever seen for CDO to OOM 2007.

CDO uses a really hacked version of the MAPI GUID for a namespace, in
reality both "0320060000000000C000000000000046" and "
{00062003-0000-0000-C000-000000000046}" refer to the same namespace in
Outlook/MAPI.

For example, for taskItem.Status you would use this in the OOM:

"http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81010003"

The GUID is used after the "/mapi/id/" part and followed by a concatenation
of the ID value (0x8101) and the property type, in this case PT_LONG
(0x0003) as strings.

If you use OutlookSpy the easiest thing to do is to look at the DASL field
or fields for a selected property. That is the string you should use with
PropertyAccessor.

For information about how CDO converts the MAPI GUID to a CDO GUID see
http://support.microsoft.com/kb/195656.

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


"Benedikt" wrote in message
news
Hi, I have to migrate an existing application (VB6) to Outlook 2007.
Currently, it uses CDO 1.21. From now on OOM 2007 is to be used. The
essence
of the code:

Const MSG_CLASS_TASK As String = "IPM.Task"
Const CdoPropSetID2 As String = "0320060000000000C000000000000046"
Const CdoTask_Status As String = "0x8101"
Const CdoTask_StartDate = "0x8104"
Const CdoTask_DueDate = "0x8105"

Dim objMsg As MAPI.Message

With objMsg
Dim sTel As String
sTel = .Fields.Item("MRSNP_CTI_NUMBER")

Dim StartDate As Date
Dim StartDateStr As String
Dim StartTimeStr As String
Call .Fields.Add(CdoTask_StartDate, CdoFieldType.CdoDate,
StartDateStr,
CdoPropSetID2)
Call .Fields.Add(CdoTask_DueDate, CdoFieldType.CdoDate, StartDateStr,
CdoPropSetID2)
Call .Fields.Add(CdoTask_Status, CdoFieldType.CdoLong, 0&,
CdoPropSetID2)

.Type = MSG_CLASS_TASK

Dim sTelnumber As String
Call .Fields.Add("SPOData", CdoFieldType.CdoString, sTelnumber,
CdoPropSetID2)

.Update True
Call .MoveTo(DestFolderID)
End With

How would the field/property handling look like in OOM 2007? I assume that
I
have to use the PropertyAccessor. But I have problems regarding how to
pass
him all necessary parameters - especially how to convert the CDO constants
to
the OOM world. For example, I've examined a task item with OutlookSpy but
the
GUID of the StartDate property is {00062003-0000-0000-C000-000000000046}
instead of the known CdoPropSetID2 "0320060000000000C000000000000046"...

Is there somewhere a documentation on how to migrate CDO to OOM?

Please help. Regards. Benedikt


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
getting email address of To property in Outlook Inbox and From property in Outlook Outbox Omatase Outlook - General Queries 1 July 19th 07 01:04 PM
What equivalent property name for the contact field "send plain text only" ? James Outlook - Using Contacts 3 August 28th 06 08:19 PM
What equivalent property name for the contact field "send plain text only" ? James Outlook - Using Forms 1 August 24th 06 12:29 PM
What equivalent property name for the contact field "send plain text only" ? James Outlook - Using Forms 0 August 24th 06 12:00 PM
Created field (CreationTime Property) changed after migration Jonas Wallin Outlook - Using Contacts 0 July 4th 06 01:34 PM


All times are GMT +1. The time now is 03:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.