Write event not firing in list view

R

Rick H

I have created a addin that updates a sql DB with all info from the
calendar, task and contacts.As changes are made in Outlook the are
updated to the DB and as they are update in the DB the changes sent to
Outlook (this is working fine). The problem is, I originally had only
code on the write event of an item but in the list view of a folder
changes made to an item is not firing the write event. So I'm now
using SyncEnd() event and checking LastModificationTime against a
date I store in the registry after each sync.

Outlook 2002 and 2003, VB6

Public Sub mysync_SyncEnd()
If ls_task_sync = "Y" Then
TaskDateCheck
End If
If ls_cal_sync = "Y" Then
CalendarDateCheck
End If
If ls_con_sync = "Y" Then
ContactDateCheck
End If
End Sub

'Some code from CalendarDateCheck:

ls_mod_time = sh.RegRead(key & "outlook_contacts_last_modify")
ls_find = "[LastModificationTime] > '" & Format(ls_mod_time, "ddddd
h:nn AMPM") & "'"
Set SafeItems = myContacts.Find(ls_find) 'Find first Appointment
Dim ade
Do While Not (SafeItems Is Nothing)
'Process data for items found
...
This seemed to be working BUT...........

Now the problem is that the EndSync event isn't firing consistently.
If the user hits F9 it works everytime. But on the timed sync setup in
Outlook it is not ever getting to the syncend event. I setup the sync
to include the folders I'm syncing with.

Hope that makes sense.
My question, is there an event or anyway to make sure I capture any
item changed in Outlook.Even when items are changed using ActiveSync.

Any help would be appreciated

Thanks, RickH
 
R

Rick H

Why don't you use the ItemAdd, ItemChange and ItemRemove events?

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German:http://www.VBOffice.net/product.html?pub=6)

Am 13 Feb 2007 06:40:09 -0800 schrieb Rick H:


I have created a addin that updates a sql DB with all info from the
calendar, task and contacts.As changes are made in Outlook the are
updated to the DB and as they are update in the DB the changes sent to
Outlook (this is working fine). The problem is, I originally had only
code on the write event of an item but in the list view of a folder
changes made to an item is not firing the write event. So I'm now
using SyncEnd() event and checking LastModificationTime against a
date I store in the registry after each sync.
Outlook 2002 and 2003, VB6
Public Sub mysync_SyncEnd()
If ls_task_sync = "Y" Then
TaskDateCheck
End If
If ls_cal_sync = "Y" Then
CalendarDateCheck
End If
If ls_con_sync = "Y" Then
ContactDateCheck
End If
End Sub
'Some code from CalendarDateCheck:
ls_mod_time = sh.RegRead(key & "outlook_contacts_last_modify")
ls_find = "[LastModificationTime] > '" & Format(ls_mod_time, "ddddd
h:nn AMPM") & "'"
Set SafeItems = myContacts.Find(ls_find) 'Find first Appointment
Dim ade
Do While Not (SafeItems Is Nothing)
'Process data for items found
..
This seemed to be working BUT...........
Now the problem is that the EndSync event isn't firing consistently.
If the user hits F9 it works everytime. But on the timed sync setup in
Outlook it is not ever getting to the syncend event. I setup the sync
to include the folders I'm syncing with.
Hope that makes sense.
My question, is there an event or anyway to make sure I capture any
item changed in Outlook.Even when items are changed using ActiveSync.
Any help would be appreciated
Thanks, RickH- Hide quoted text -

- Show quoted text -

I originally had the ItemAdd, ItemChange and ItemRemove working but it
was not firing when ActiveSync was doing the change. I put these
events back in as they do seem to be more consistant then ItemWrite.
Thanks, Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top