LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Generation -> Build an exe from a PC with different Office Version

Solved!
Go to solution
Hi,

 I want to build an exe from a VI that uses Report Generation Toolkit. The application has to be deployed on several PCs that use Office 2000. During development phase I installed on my PC, Office 2000 and everything was ok. After I was done with it, I reinstalled Office 2007. So, the Report Generation Toolkit from my PC is for Office 2000 (it was installed when I had Office 2000 on my PC).

 These days I had to fix some bugs from my application, I made a new exe but the part that generates Word reports (using RGT) is not working anymore - I received that error with -35...9935 (or something like this).

 I tried to search for the problem and I found it: with exactly the same VI's (_Word Dynamic VIs.vi - for Office 2000) the invoke nodes from a PC with Office 2007 and a PC Office 2000 look different. For example in Word_Open_Document.vi, the invoke node Document is different for a PC with Office 2000 + RGT for 2000 and a PC with Office 2007 + RGT for Office 2000 (no mistake).

 So, I've tried to copy the VI's from a PC with Office 2000 + RGT 2000 to my PC but I cannot build it because I get the error: There are some errors in _Word Dynamic VIs.vi (the invoke nodes do not fit).

Finally my question is: How can I build the exe on my PC: Office 2007 but with RGT for Office 2000??

 
Thanks,

Paul

 

0 Kudos
Message 1 of 5
(2,629 Views)

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).

Regards
Guru (CLA)
0 Kudos
Message 2 of 5
(2,602 Views)
Solution
Accepted by topic author PaulieQ

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

Message 3 of 5
(2,593 Views)

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. 

greetings from the Netherlands
Message 4 of 5
(2,564 Views)

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

Message 5 of 5
(2,534 Views)