Error 97 with the Microsoft Office ActiveX API in the Report Generation Toolkit
When using the Report Generation Toolkit in LabVIEW, you may sometimes encounter the well-known Error 97.
This error typically occurs when there is a mismatch between the Microsoft Office version used during development and the version installed on the machine running the code. For example:
-
the LabVIEW project was developed with Office 2010,
-
but executed on a computer running Office 2016.
It may also appear if the code or executable is moved to another machine using a different Office version.
Why does Error 97 occur?
The cause is simple: the ActiveX function prototypes differ from one version of Microsoft Office to another.
LabVIEW cannot automatically adapt to these changes, which triggers the error.
Fortunately, the fix is relatively straightforward—provided you know where to look.
Resolution Steps
1. Install the Office version used on the target machine
Start by installing the version of Microsoft Office that will be used on the target machine (the one running the code or executable).
2. Perform a “mass compile”
Next, run a mass compile of all the files in the LabVIEW project:
Menu: Tools → Advanced → Mass Compile…
This forces LabVIEW to recompile all VIs using the currently installed Office version.
3. Check and reload the ActiveX methods
If the error persists, open the affected VIs to identify which ActiveX method is throwing the error.
Each method must then be reloaded manually:
-
Click the name of the ActiveX method.
-
Select another method temporarily.
-
Switch back to the original method.
LabVIEW will automatically update the prototype (the number of inputs/outputs may vary depending on the Office version).
Once all methods are reloaded, Error 97 disappears!
Special case: Multiple Office versions
If you distribute an executable (EXE) to multiple users running different Office versions, make sure to generate a separate executable for each version.
This prevents ActiveX prototype conflicts between environments.
Frequently affected methods
Here are some common Excel methods that often require reloading:
- BorderAround
- SaveAs
🧩 Found other problematic methods? Help us expand the list!
In summary
⚠️ Error 97 = ActiveX prototype incompatibility between Office versions.
🔄 Fix = install the target version, mass compile, reload affected methods.
💡 Best practice = one executable per Office version to avoid conflicts.
Featured Insights

Predictive Maintenance: Harnessing Your Industrial Data
Predictive maintenance is transforming industry by detecting failures early through continuous machine data analysis. With custom data acquisition systems, Neosoft

What Should You Do with Your Windows XP Systems?
Still using Windows XP for your machines or test benches? With security updates long gone, planning a structured migration is
How can we help you?
Receive a personalized response from our experts within 24 hours, with solutions tailored to your automation and data acquisition needs.