LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Print ot MS Word

Actually i have a report configuarion file. For printing and viewing purpose i am linking that configuration file to report vi template. I want to export that vi to MS Word file. How can i do that.

I tried with Print to RTF vi method and used custom format. I gave the vi print property to fit to page and i saw in the msword file, their the VI image is bigger than the printable area and it prints the VI name and "front panel" text with the front panel image.How can avoid these.
0 Kudos
Message 1 of 3
(3,155 Views)
You can try to use VI server to do this. This allows you greater control of what to show in the document. See the attached file.

Joe
0 Kudos
Message 2 of 3
(3,155 Views)
If I understand your problem correctly, you are trying to create a Word document that only has an image of your VI's panel, scaled to fit your page.

Unfortunately, the VI's "fit to page" property only applies when LabVIEW is working with the printer. When creating a Word file, LabVIEW has no way to know what the page size will be - you can setup your page size and margins in Word to anything.


You can probably achieve what you want by getting the VI's panel image (via the VI's Get Panel Image method), saving it to an image file (using a function from the Graphics Formats palette), and using Word's ActiveX interface. Word's ActiveX interface varies between versions, so I can't say exactly how you could create a document and insert your ima
ge. Also, I'm not sure how you would fit the image to the page - perhaps if Word supports a way to resize the image to a certain size.


It's possible that the LabVIEW Report Generation Toolkit for Microsoft Office might make this easier, but I'm not sure if it handles scaling the image to fit the page.



Christina Rogers
Principal Product Owner, LabVIEW R&D
Message 3 of 3
(3,155 Views)