07-13-2014 05:13 AM
Hello,
Im using LV2013 with office 2013 report tool kit. I am trying to use Word edit cell to input values in table previously created in template .doc.
Indeed, i trying the example Generate report from template and didnt works well. I search for solution and I see it was a problem with previous version but it seems not solve totally in this version for word office 2010.
http://digital.ni.com/public.nsf/allkb/4041ECB5D02BA57D862579A00002FE8D
I checked this thread but i didnt get it to works. http://forums.ni.com/t5/LabVIEW/Problem-with-append-table-and-Word-2010/m-p/2190960#M702610
Any way to solve it?.
Thanks for help.
Fred
07-13-2014 06:16 AM - edited 07-13-2014 06:17 AM
Hello, I solve it adding this to Word_insert_Table.
http://forums.ni.com/t5/LabVIEW/Report-Generation-MS-Word-Table-Bug/td-p/1605170
Thanks.
Open [LabVIEW installation folder]\vi.lib\addons\_office\_wordsub.llb\Word_In
There is a nested for loop that interprets the provided string array data and reformats it into a long ASCII string for the copy buffer. It should look like this:
Change the nested loop to look like this:
The changes I've made are twofold:
1. Within the inner loop, replace the "\n" char with a Tab character
2. Just after the inner loop, add a new "concatenate strings" function that adds "\n".
06-17-2016 02:11 PM
Hi folks,
I need to add images and text data to the particular cell of the table.
I used word edit cell to append data to the cell. But it overwrites the data and only the last value remains.
I have attached the vi with this.
Thanks in advance!
Best regards,
Shree
06-19-2016 01:43 PM
shree_bala a écrit :Hi folks,
I need to add images and text data to the particular cell of the table.
I used word edit cell to append data to the cell. But it overwrites the data and only the last value remains.
I have attached the vi with this.
Thanks in advance!
Best regards,
Shree
Word Edit Cell.vi uses the cell range text property so when you use it again on the same cell it overwrite it. Is there a specific reason why you don't write all the cell text at once? Then you can add the picture..
What you're asking is very specific and can't be accomplished using only the Report Generation Toolkit vis, you will also have to use some ActiveX methods and properties if you can't insert all the cell text at once.
Using only the RGT vis you can add the picture to a cell without overwriting its text content but the picture will be placed before the text (at the range start position).
To insert it after the text you need to move the cell range start to the next character formatting (set wdUnits input of the Range.Move.Start method to 13) which is tthe end of cell character.
You can have a look at the code inside Word Edit Cell.vi in the text and picture case to get an idea on how to use ActiveX methods and properties. In the Word Advanced palette there is a vi called Get ActiveX references , you will have to use it to get the references to the InlineShapes and Tables collections references.
Ben64