LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open a Word document in LabVIEW

Yes, I do need Word.  I'm using the Report Generation Tool Kit and already written a vi  I use an Event Structure to run the test.  When its complete I give the user the choice to view the report ( another "Event" using a push button).  I always save the report.  If the user wants to View the Report ( another button) I open the word document with the correct file name using the routine on found in the discussion group.  I fthey don't view the report they can run another test.
The sequence is as follows:
Run the Test and save the report (an Event Structure)
Using another button allow the user to view the Report ( Event Structure and the LV routine I got in the discussions group) IF they wish. Or run another test OR Exit. 
This view the report is where I need it to launch Word with the correct test file.  I may have to nest a Event Structure so that the user can't view a report BEFORE they've run the test.
 
0 Kudos
Message 11 of 15
(1,562 Views)
Do NOT nest another event structure. If you only problem is that the operator might click the view report button before the test is complete, disable the control until the test is finished. If you have a run test event, the first thing that should be done is to disable the view report and the last thing done would be to enable it.
0 Kudos
Message 12 of 15
(1,550 Views)
Thanks Dennis.  I realized the pitfalls of nesting a Event Structure after I posted the message.  I think I've found a solution to my problem.  Thanks to all who contributed. 
0 Kudos
Message 13 of 15
(1,535 Views)

Excellent!

It works on w7.64b too.


@Joe_H wrote:
 
Here's my 2 cents.
 
Word is already set to open the document in windows so why not just use the system exec VI to open the document. this way it will always open with word. then you just close it when you are done. i do this all of the time with help files and such.
 
Here is the VI I created to do this.
 

Message Edited by Jhoskins on 10-11-2006 01:26 PM


 

0 Kudos
Message 14 of 15
(460 Views)

An even easier method is to use: Open a Document on Disk.vi

I'm not sure when it first appeared, but it goes back to at least LabVIEW 2010.

 

C:\Program Files (x86)\National Instruments\LabVIEW 20XX\vi.lib\Platform\browser.llb\Open a Document on Disk.vi

open doc.png

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 15 of 15
(447 Views)