Get rid of error 97 occurring with Microsoft Office ActiveX API in the Report Generation Toolkit

Contact us

Get rid of error 97 occurring with Microsoft Office ActiveX API in the Report Generation Toolkit

October 27th, 2017

Using the Report Generation Toolkit you might face a strange Error 97.

This error might happen if the Microsoft Office version with which your LabVIEW code has been done came to change (new version installed on the computer or code/exe moved to a computer with a different version).

Solving this problem is quite simple when you know where to look!

This error occurs because several ActiveX function prototypes changed between the first and second version of Microsoft Office programs, and LabVIEW is not able to adapt to the new one.

To fix it, you first have to install the target Office version on the development computer. Then you can mass-compile the files in your project by clicking on the LabVIEW menu ‘Tools -> Advanced -> Mass compile …’.

But it might not be sufficient!

You’ll have to open the VIs giving the errors and identify the ActiveX method producing the problem. When the method is identified, you’ll have to reload its prototype. To do this easily, click on the method name, choose another method. Then do the same action again, but choose the original method: you’ll see that the prototype will be updated (more or less inputs / outputs).

When all prototypes are fixed, error 97 will disappear!

  

If you are distributing your EXE to users with multiple versions of Office, you will need to create an EXE for every Office version that will be used.

Here is a non-exhaustive list of methods to update:

  • Excel :
    • BorderAround
    • SaveAs

Help us to complete this list !

Share this post?

Cyril Gambini

Leave a Reply

Your email address will not be published.