View Single Post
  #4  
Old May 28th 09, 02:24 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook become non responsive if i write outlook item in bulk

You didn't answer my questions. What do you mean by "Outlook becomes
unresponsive"?

Even in Exchange cached mode you should be able to get the correct
LastModificationTime value. Did you save the item when you made any changes
to it before trying to read the changed LastModificationTime value?

I would change that code you're using because it's still using multiple dot
operators. I'd assign a specific Outlook item to mobjApptMAPIFld.Item[i] and
then read LastModificationTime from that. I'd also set that object variable
to Nothing each pass through the loop.

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


"Ashish" wrote in message
...[i]
Hi ken,

Thanks for the prompt reply.
To my surprise now, i found out that write works fine.
We were looking for bug in wrong place, as after using MFCMapi tool, i
found
out that PR_lastmodification_time is updated.
But while reading it do not read the updated time but the cached time.


I am using the standard code to read LastModification time, suggested by
microsoft in help document.
Following is the code sample.

,,Private mobjOutlook As Microsoft.Office.Interop.Outlook.Application
'outlook application
,,Private mobjOlNs As Microsoft.Office.Interop.Outlook.NameSpace '
current namespace to work with
,,Private mobjApptMAPIFld As
Microsoft.Office.Interop.Outlook.MAPIFolder ' current folder to work
with calendar

,,,, mobjOlNs = mobjOutlook.GetNamespace("MAPI")
,,,, mobjApptMAPIFld = mobjOlNs.GetDefaultFolder(Microsoft.Office.Intero
p.Outlook.OlDefaultFolders.olFolderCalendar)
,,,, mobjApptMAPIFld.Item.LastModificationTime// give the appointment


Even if i logoff and logon session through code and use getitembyid
property
to retrived the idem detail, it gives me same unmodified date.
Is there any api, though undocumented, which can be used to get the
uncached
last modification time ?

Best Regards
Ashish Rawat


Ads