_SynEnd() Event

  • Thread starter Thread starter Meex
  • Start date Start date
M

Meex

I user Outlook 2002 SP3, and I want to work with the SyncObjects.
I try to catch the _SyncEnd() event, but this didn't work?!
_SyncStart() and -SyncProgress() are working fine.

Here my class object:

Dim myOlApp As New Outlook.Application
Dim WithEvents mySync As Outlook.SyncObject

Sub Start()
Dim objFolder As Outlook.MAPIFolder
Dim myNameSpace As NameSpace
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set mySync = myNameSpace.SyncObjects.Item(1)
mySync.Start
End Sub

Private Sub mySync_SyncStart()
Debug.Print "Start"
End Sub

Private Sub mySync_SyncEnd()
Debug.Print "Ende"
End Sub


I use this class in a module:
Sub SyncCalendar()
Dim synchObject As New clSync
synchObject.Start
End Sub

regards
Meex
 
Are the events declared in the class module 'clSync'? Then synchObject must
be declared in the head of the module. The way you're doing it, the variable
goes out of scope and thus the clSync class terminates before the SyncEnd
event is fired.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am 12 Mar 2007 01:22:44 -0700 schrieb Meex:
 
Back
Top