02-15-2010 04:16 AM
Solved! Go to Solution.
02-15-2010 10:56 PM
my suggestion would be to create wrapper vi that will call the "Word Dynamic VIs". based on the installed version of Office (2000,2003 or 2007).
02-16-2010 04:04 AM
Hi,
Thank you for your advice. Can you please tell me what you want to say with the wrapper vi? I don't really understand what you mean.
By the way, I solved the problem. I discovered that the Invoke Nodes are updated based on the Object Library for the ActiveX control (in this case the MS Office). The data types are store in the msword9.olb (version 9 - for office 2000 in Office folder) and msword.olb (version 12 - for office 2007 also in Office folder). I tried to register the msword9.olb (using the regsvr32.exe) but it doesn't work for olb files - I need the ocx or dll. But, if I replace the msword.olb from Office 2007 with msword9.olb from Office 2000 everything work.
Ok, steps that have to be done:
1. Install the RGT for Office 2000 on the PC
2. DO NOT Change anything in _Word_Dynamic VIs.vi. When Office 2007 is installed the VI arrow should be broken (error in VI)
3. Copy the msword9.olb from a system with Office 2000 (or your version) and copy it to your system with Office 2007 with the new name msword.olb. DO NOT FORGET to make a backup of the original MS Office 2007 file and to restore it at the end.
4. After the new msword.olb is there, the _Word_Dynamic VIs.vi should have no error
5. Build your exe application
6. Restore the old msword.olb
7. ENJOY your life !
I hope this is useful also for somebody else.
Paulie
02-17-2010 02:44 PM
thanks for your solution. It will surely help people.
Your remark about not understanding dynamic loading triggered me.
I fact dynamic loading means to load the set of vi's dynamically, depending on the version of msoffice.
The first step is to have several vi's for several versions of MSoffice, and in that you are better than I am.
Save them for the different versions and do'nt edit them. e,g, in an llb.
And then instead of statically linking them load them from the correct llb with vi-server calls.
If you want I can explain in more detail but not tonight.
02-19-2010 07:03 AM
Hi Albert,
Ok, now I get it. By "wrapper vi" he meant to load dynamically a VI.
This was not a solution for my problem. The VI from the RG Toolkit are anyhow dynamically loaded. But, in order to build a functional EXE, one must add the _Word Dynamic VIs.vi (contains all the VIs that are used for RGT, most of them dynamically loaded) in the Source Data Files/Always Included in Builder file. In order to add them, this VI have to be in the project. If this VI is in the project, I cannot build the EXE because one of the VI form the project has an error (_Word Dynamic VIs.vi). So I was back to the starting point.
I don't know exactly which is the English name for the builder tabs (Source Data Files/Always Included). My Labview is in German.
Regards,
Paul