OutlookSync "Automation variable has not been instantiated"

afarrafarr Member Posts: 287
I have encountered problems when running Outlook Synchronization. If you know how to resolve them, please let me know.


I am running Nav 4.03 (build 23305) on a SQL 2008 database.
My PC has Win XP, and Office 2007.
When running Outlook Synchronization, I get the following error:

Could not invoke the member Restrict. The OLE control or Automation server returned the following message: The requested member does not exist, or the call tried to set the value of a read-only property.
This error happens on the following line in Report 5171 (Import Contacts – On PreDataItem):

OLContacts := OLContacts.Restrict('[Sensitivity] <> 2');


Another user, who has Outlook 2003, runs into a different error in Report 5171 (Import Contacts – OnAfterGetRecord):
“The Automation variable has not been instantiated.”

There is no customization on any object whose title contains “Outlook” or “Sync”.

Regards,
Alastair
Alastair Farrugia

Answers

  • afarrafarr Member Posts: 287
    After I registered and unregistered different versions of nathash.dll and OLhandler.dll, the first error ("Could not invoke the member Restrict.") did not appear again, although I don't know if that really solved the problem or if it's just a lucky co-incidence.

    However, I do have a solution to the second problem (“The Automation variable has not been instantiated.”).
    Report 5171 (Synchronize with Outlook) has various checks like the following:
    IF ISCLEAR(OLContacts) THEN
      CurrReport.SKIP;
    
    However, these are in the OnPreDataItem trigger, where SKIP has no effect - it should be changed to BREAK, and then the report works well.
    Alastair Farrugia
Sign In or Register to comment.