_SynEnd() Event

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
 
M

Michael Bauer [MVP - Outlook]

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:
 

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