LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data formatting in Ms Word

Hello,

 

I'm writing the data into word document and not able to format properly.

In the document 1st line is "Tittle", 2nd line is "Place", 3rd line left side is "File Name" and right side is "Date", 4th line left side is "Freq" and right side is "Polarization". 

Kindly help me where I have to change in attached VI to achieve the above requirement.

 

Regards,

S Nagaraju.

0 Kudos
Message 1 of 12
(3,895 Views)

In this case it would be easier to create a Word template with bookmarks and save the informations to these bookmarks.

 

The Report Generation Toolkit vis contain are adding a double carriage return so you can't simply use them to do what you want. For your 3rd and 4th lines you should use a table with no borders and format the first column to left align and the second column to right align.

 

Ben64

0 Kudos
Message 2 of 12
(3,860 Views)

Thank you for the Reply Ben,

 

I am able to create the table with no borders. Why vertical line is showing in between the columns and I am not able to do the column wise alignment. And how to save this document as .pdf.

Please find the updated snippet and help me in above issues.

 testt.png

Regards,

S Nagaraju.

0 Kudos
Message 3 of 12
(3,830 Views)

I don't know why but wdLineStyleNone only applies to external border and horizontal separation lines. You can get rid of the center vertical line by formatting the left column then the right column.

 

Word Align.png

Ben64

0 Kudos
Message 4 of 12
(3,815 Views)

Thank you very much Ben.

Instead of word document, how do i save the file as PDF?

 

Regards,

S Nagaraju

0 Kudos
Message 5 of 12
(3,795 Views)

And how to remove the empty lines in between table and picture??

 

Regards,

S Nagaraju

0 Kudos
Message 6 of 12
(3,774 Views)

I have seen that link before posting the query. That property node will work only for 32-bit MS-Office.

 

Thanks,

S Nagaraju

0 Kudos
Message 8 of 12
(3,762 Views)

Sonti_11532 a écrit :

And how to remove the empty lines in between table and picture??

 

Regards,

S Nagaraju


This is not something easy to do, is it that important to remove them?

To remove them you will have to get the Word._Document ActiveX reference to delete the last two empty paragraphs (carriage returns are delimiting paragraphs in Word)  before adding the picture. Sounds easy to do but it's not, you need to be familiar with ActiveX and the Word object model.

 

Ben64

0 Kudos
Message 9 of 12
(3,744 Views)

I have tried with Word._Document ActiveX reference, but MS-Office 64-bit is installed into my PC. I referred the link following link.

http://digital.ni.com/public.nsf/allkb/35B534325E6692178625805E0047C39B

 

How to address the issue in 64-bit MS Office.

 

Regards,

S Nagaraju.

0 Kudos
Message 10 of 12
(3,727 Views)