Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / February 2005

Tip: Looking for answers? Try searching our database.

Outlook object model and SyncObjects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Petr Jarkovsky - 14 Feb 2005 21:44 GMT
Hi,

I have the problem with Outlook object model and SyncObjects.
When I use something like OutApp.Session.SyncObjects.Item(1).Start, it works
fine, but I need to catch events OnSyncStart, OnSyncEnd, OnProgress and
OnError. So, I wrote my own class (in Delphi, inherited from TOleServer) for
connecting to SyncObject and listening for these events.

When I connect to any SyncObject (e.g. OutApp.Session.SyncObjects.Item(1)),
the calling Start method of this object raise an exception with message:
'Cann't get synchronization objects in Outlook application. This problem is
obviously caused by the wrong configuration of Outlook application for
offline mode.' (translated to English).

I used some examples from MSDN and other web sites, I used even original
example code from Borland, but I still get the same error.

Can someone help me?

Petr Jarkovsky
Petr Jarkovsky - 17 Feb 2005 20:55 GMT
I found a solution of this problem.
I must hold an active Explorer object in memory. Just only in some variable.
Then I can use SyncObjects without raising the exception.

e.g.:
in initialization section:
 inbox := OutlookApp.Outlook.Session.GetDefaultFolder(olFolderInbox);
 explorer := inbox.GetExplorer(EmptyParam);

in finalization section:
 explorer.Close;
 explorer := nil;
 inbox := nil;

Petr Jarkovsky

> Hi,
>
[quoted text clipped - 17 lines]
>
> Petr Jarkovsky
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.