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