question

Upvotes
Accepted
1 0 1 2

How to reference Synchronisation Manager correctly to X, Y and Z bin folder?

Can someone show me show to reference PLSynchronizationMgr.dll when installation folder can be either X, Y or Z? I would prefer late binding method instead. Some samples will be much appreciated. Thanks

eikoneikon-com-apisynchronisation
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
39.2k 75 11 27

@vincent.tan

The only time I expect to see this compile error due to missing VBA reference is if the file is opened in the session of Excel without Eikon Excel COM add-in loaded.
When the spreadsheet is opened in Excel with Eikon Excel add-in loaded (whether signed in or not), VBA will recognize that PLSynchronizationMgr.dll is already in-memory and won’t use the path in the reference to access the library. In other words, as long as Eikon Excel COM add-in is loaded into the session of Excel, the user should never see the compile error due to missing VBA reference.
If you need to deal with the case where the spreadsheet may be opened in Excel session without Eikon Excel COM add-in, the only workaround I can suggest is to copy PLSynchronizationMgr.dll to a common location where it can be referenced from in all VBA projects. This is solely for the purpose of providing COM class definitions and avoiding the compile error. For that reason I would also strongly suggest adding a bit of defensive code surrounding the parts of code that access COM objects from PLSynchronizationMgr.dll. Specifically I suggest checking if Eikon Excel COM add-in is loaded into the session of Excel before creating any objects provided by PLSynchronizationMgr.dll. E.g.

If Application.COMAddIns("PowerlinkCOMAddIn.COMAddIn").Connect Then
  Set objEikonSyncMgr = CreateReutersObject("PLSynchronizationMgr.SynchroMgr")

Else 
  MsgBox "Thomson Reuters Eikon Excel add-in is required for this file and is not loaded into this session of Excel. Please load Thomson Reuters Eikon Excel COM add-in and try again."

End If
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
4.6k 26 7 22

@vincent.tan, you can reference it once from your active folder (check out %PROGRAMFILES(X86)%\Thomson Reuters\Eikon\Eikon.exe.xml tag Eikon/BinFolder)

After that Excel will give you a version that is loaded with Eikon Excel itself.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 1 2

I have reference it to my active folder which is X. When users open on their PC they get the following error because they only have Y and Z on their PC.


ttemperr.png (20.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 1 2

Thanks Alex. We have tried that and the compiling error remains. We load our components via command lines. The COMAddin is not loaded yet when the compilation take place in Excel. Hence adding the If Statement beforehand does not address the problem.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
39.2k 75 11 27

Hi @vincent.tan
In this case, as I said in my previous response, the only workaround I see it to copy PLSynchronizationMgr.dll to a common location where it can be referenced from in all VBA projects. This location can be a network drive accessible by all users or a common location on the local drive. Referencing PLSynchronizationMgr.dll from a common and static location will take care of the compile error. The defensive code sample I provided was not meant to address the compile error. It was meant to prevent the instantiation of objects provided by PLSynchronizationMgr.dll when Eikon Excel COM add-in is not loaded (yet), which would result in a run-time error.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 1 2

Hi Alex and Zhenya, I have tried copying the dll into a shared folder on the network drive. Excel does not allow early binding on files sitting on the network drive. Hence this option will not work. Another possibility is to copy the dll files into their local machines. IT desktop support will need to be involved and does not self update to the new version when it becomes available. In the end I have decided not to use PLSynchronizationMgr.dll at all in any of my solutions.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
39.2k 75 11 27

Hi Vincent,
Sorry to hear you decided not to use PLSynchronizationMgr.dll. On my end I have no problem copying this dll to a network drive and referencing it in a VBA project, which then compiles without Eikon Excel add-in. What was the error you saw when you tried to do this?
The fact that the file on the network share will not be updated is of little significance.
PLSynchronizationMgr.dll is in care and maintenance and no updates are expected. However, should there be an update, the file in Eikon install folder will be updated, and this is the file that is loaded into Excel and used at runtime. The file on the network share only provides class definitions used at compile time if Eikon Excel add-in is not loaded. And existing class definitions in a COM library cannot change even if the library is updated because this would break backwards compatibility. When a COM library is updated one can only add new classes, properties, methods and events. Definitions for existing properties, methods and events of existing classes cannot change.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea