LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Word Report Problem

Why does the formatting of a Word (XP) table get lost when using PasteAndFormat (wdFormatPlainText)? Does anyone know how to prevent a Word template formatting from getting changed by LabVIEW 7.1?

Attached are 3 files:
1. LabVIEW VI example (very small)
2. Word Document with a table. The CW & CCW columns are Centered and in Blue text. After LabVIEW transfers the data the columns are reformatted to Left Justified and Black.
3. PasteSpecial.gif Add the PasteAndFormat as shown in this gif file to Word_Update_Table.vi
Download All
0 Kudos
Message 1 of 4
(2,783 Views)
You can not save the formatting in your template. You must perform the formatting in LV. See the attached vi.
Message 2 of 4
(2,783 Views)
If you want to get formatting from your current word document, (i.e., template settings), you would have to use ActiveX Objects to get the information. Unfortunately, LabVIEW does not have Word VIs that will get Word properties, only set them.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 3 of 4
(2,783 Views)
I was not trying to read the properties. I just wanted to use a word template with all the formatting (Easier to format in Word then through LabVIEW). I did not want to add unnecessary stuff to my LabVIEW program. All the add programming is time wasted as well it takes computer resources to perform.

From all I have learned it looks like I have no choices but to format through LabVIEW.

Thanks for your input.
0 Kudos
Message 4 of 4
(2,783 Views)