From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to handle error 97

i'm using labVIEW 7.1  to create stand-alone application.
when printing report to microsoft word document labview generates Error 97.  What is this error and how to overcome this error? 
0 Kudos
Message 1 of 10
(5,510 Views)

Hi locman,

Can you tell me a bit more about the application and when you get the error? Maybe even a screenshot of the message would be great. Also, what OS are you using and which version of Word are you using? Doing a quick search, I did find a KnowledgeBase article on Error 97 using the Report Generation toolkit. Basically, what it says it to recompile the VIs.

 

 

National Instruments
Applications Engineer
Message 2 of 10
(5,485 Views)

Hi locman,

using the LV "explain error" function gives this result:

"Error 97 occurred at an unidentified location
Possible reason(s):
LabVIEW:  Null Refnum was passed in as input."

Maybe this helps you to find the error.

Mike

0 Kudos
Message 3 of 10
(5,482 Views)

i'm running windowsXP O.S., LabVIEW 7.1

The PC where i create the stand-alone application is running Microsoft office 2007, and PC where i installed the stand-alone application is running Microsoft office 2002.  could this be the of cause error 97? The program collects data and prints the data to word document(using bookmark), it then sends .doc file to printer for hard copy.

0 Kudos
Message 4 of 10
(5,469 Views)


locman wrote:

i'm running windowsXP O.S., LabVIEW 7.1

The PC where i create the stand-alone application is running Microsoft office 2007, and PC where i installed the stand-alone application is running Microsoft office 2002.  could this be the of cause error 97? The program collects data and prints the data to word document(using bookmark), it then sends .doc file to printer for hard copy.



Yes.  The activeX controls are different between Office2007 and Office2002.  So compiling the executable with one version is incompatible with running it on the other version.
0 Kudos
Message 5 of 10
(5,464 Views)

Hi, I too have this error code but am using the same laptop just with different users. The .exe works fine on my username account but when i log into another user name and paste the application the program runs fine until it opens word and tries to save to the report created in report generation.

 

I am using active x to open word.  Have also added the required _word files to my project.

 

Any advice?

0 Kudos
Message 6 of 10
(5,161 Views)

What do you mean by "paste the application"?

 

Is the other user an admin on the laptop?  Are you trying to write files to any locations (such as a program files directory) that a non-admin would not be able to access?

0 Kudos
Message 7 of 10
(5,144 Views)

Hi, i copy the application from my location and then paste it onto the desktop of the other user.  Then i log in and run the .exe.

My process is take measurements wcich is ok then add the results into a report.  Then open word using active x and move the data around for presentation purposes.

 

See attached jpg for my active x call.

Thanks

0 Kudos
Message 8 of 10
(5,139 Views)

Grant,

 

        Ravens Fan's thinking is the same as mine. If you are able to run the exe just fine on the admin account where you developed it and then transfer all necessary files over to another user account on the same laptop and it doesn't allow you to interact with Word, then I suspect that word was installed for Admin only rights or you are trying to save the file to a location that is Admin access only. If you adjust the account level to Admin instead of Standard (you will have to log in to your Admin account to be able to adjust the other user accounts permission level), do you get the same error? Try creating a folder on the desktop of the standard user account and save a .txt file from Word to that folder (to make sure that you can save to it from the standard user account) and then try pointing the exe to save there. Does that work? Also, just a couple of housekeeping questions: what version of Word are you using? (I'm assuming you are interacting with the same version in both accounts?) and Can you post a picture of the error message you are seeing? (This helps us know what VI is throwing the error hopefully). 

0 Kudos
Message 9 of 10
(5,109 Views)

Hi and thanks for the help.  I have found the problem and it was a very simple solution.  In word, on both user accounts, i needed to enable an option .  It is located in Word - Options - Security - Macro security - Trust access to Visual Basic Project.  By enabling this option, i did not receive error 97 when using "automation open" to start manipulating a word document.

Hope this helps peeps in future.

0 Kudos
Message 10 of 10
(5,071 Views)