LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I insert text into a Word document without moving the bookmarks?

I am using LabVIEW 2010 with the Report Generation toolkit. I am creating a Word report, and need to use 53 bookmarks to control where the text is inserted. When I run the vi, the second bookmark is pushed out by the length of the first text insert, and so on. With Word open, hitting the Insert key causes the new text to over write the existing text, which is perfect. The bookmarks are separated by tabs and spaces on a template, and I would like to over write the tabs and spaces with the newly inserted text instead of kicking the next bookmarks all out of allignment. How can I do this?

0 Kudos
Message 1 of 2
(3,332 Views)

One thing that you could try is to generate a keystoke.  You can do this by calling into the user32.dll in Windows.  Here is an example of how to do this.  Once your report is open, you can call to the DLL and generate a INSERT keystroke.

 

Brandon Treece

Applications Engineer

National Instruments

0 Kudos
Message 2 of 2
(3,308 Views)