View Single Post
  #1  
Old May 27th 09, 09:00 PM posted to microsoft.public.outlook.program_addins
Ashish[_2_]
external usenet poster
 
Posts: 1
Default Outlook become non responsive if i write outlook item in bulk

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.olTask Item, mobjTaskMAPIFld,
IIf(OlType = Microsoft.Office.Interop.Outlook.OlItemType.olAppo intmentItem,
mobjApptMAPIFld, mobjContactMAPIFld))

On Error GoTo OpenAsDefault
Err.Clear()
olitem= MyFolder.Items.Add(OlType)
olitem.save
System.Runtime.InteropServices.Marshal.FinalReleas eComObject(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
Ads