DWA template, Address Book Automatic Sync

We are currently using the DWA7 template for our mail files, and we are a Blackberry Shop as well.

We are changing our procedures around and trying to use the DWA design to store users personal contacts…

My Question is how do we get this set to schedule through out the day for the user so they don’t have to remember to click Actions, Sync Address Book…

My one twist to all of this is, most of these users have admin assitance and will need to access these users mail files through out the day with Lotus Notes… How do we get this set to run only for that user and not anyone else that access the mail file?

Subject: DWA template, Address Book Automatic Sync

I was able to automate sync by putting code in the QueryClose event of the database script, but you should be able to adapt this method to a scheduled agent.

You probably don’t have to test the session’s UserName property against the value of the calendar profile document’s Owner item - iNotes_DoSync has its own test for that - but I’m working on other code in that If statement.

You will have to put Use “AddressBookSync” in the Options, though.

Sub Queryclose(Source As Notesuidatabase, Continue As Variant)

Dim sess As New NotesSession

Dim db As NotesDatabase

Dim profDoc As NotesDocument

Set db = source.Database

If Not (sess.IsOnServer) Then

  Set profDoc = db.GetProfileDocument("CalendarProfile")

  If (sess.UserName=Cstr(profDoc.Owner(0))) Then

	    Call iNotes_DoSync("D_CONTACTS",False)

	    Call iNotes_DoSync("D_JOURNAL",False)

  End If

End If

End Sub