LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing word documents

It�s known that if you right click on a word document (.doc) and select �print�, the PC will automatically launch MS Word, open the word document, print to the default printer, and exit the Word program.

My question is, can LabVIEW emulate such user action of right clicking the document file and select �print�. I think that if this approach works, things will be much simpler, as no ActiveX or Report Generating functions needs to be called.

Thanks in advance for your input.

USCTrojan
0 Kudos
Message 1 of 3
(2,907 Views)
Yes--all you have to do is use a Call Library Node to call ShellExecuteA in Shell32.dll on Windows. Pass it the filename and the "print" verb, and you can print Word documents, HTML pages, and basically anything Windows knows how to print from Explorer.

See the attached example written in LabVIEW 6.1.
Message 2 of 3
(2,907 Views)
Thanks to you. unDees, for this great insight!
0 Kudos
Message 3 of 3
(2,907 Views)