A
Ashish
Hi
I write outlook item using the simple MAPI api .
Following is the code example.
Dim MyFolder As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim MyFileName As String
Dim OlType As Microsoft.Office.Interop.Outlook.OlItemType
Dim TypeSuffix As String
Dim olitem as object
OlType = GetCorrespondingOlItemType(CalType)
TypeSuffix = GetCorrespondingSuffix(CalType)
MyFolder = IIf(OlType =
Microsoft.Office.Interop.Outlook.OlItemType.olTaskItem, mobjTaskMAPIFld,
IIf(OlType = Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem,
mobjApptMAPIFld, mobjContactMAPIFld))
On Error GoTo OpenAsDefault
Err.Clear()
olitem= MyFolder.Items.Add(OlType)
olitem.save
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(olitem)
if a write many items in bulk, the oulook behaves inconsistently,
Even if i create a new contact manually and update it, lastmodification time
property will not get updated.
Though this issue is not consistenly reporducible, can some help me finding
any reason why this is happening ?
Thanks in advance.
Best Regards
Ashish Rawat
I write outlook item using the simple MAPI api .
Following is the code example.
Dim MyFolder As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim MyFileName As String
Dim OlType As Microsoft.Office.Interop.Outlook.OlItemType
Dim TypeSuffix As String
Dim olitem as object
OlType = GetCorrespondingOlItemType(CalType)
TypeSuffix = GetCorrespondingSuffix(CalType)
MyFolder = IIf(OlType =
Microsoft.Office.Interop.Outlook.OlItemType.olTaskItem, mobjTaskMAPIFld,
IIf(OlType = Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem,
mobjApptMAPIFld, mobjContactMAPIFld))
On Error GoTo OpenAsDefault
Err.Clear()
olitem= MyFolder.Items.Add(OlType)
olitem.save
System.Runtime.InteropServices.Marshal.FinalReleaseComObject(olitem)
if a write many items in bulk, the oulook behaves inconsistently,
Even if i create a new contact manually and update it, lastmodification time
property will not get updated.
Though this issue is not consistenly reporducible, can some help me finding
any reason why this is happening ?
Thanks in advance.
Best Regards
Ashish Rawat