LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX cursor to end of word document

Solved!
Go to solution

Hi All
I am working with LabView 2014 and MS Word 2007

Using ActiveX i have managed to copy required sections (tables/images NOT text) of a Word document template to clipboard. I have checked this by manually pasting the clipboard into a new word document.

However I need to programmatically paste the contents of the clipboard to the end of a word document but cannot figure out how to set the cursor position to the end of the word document ready for pasting using activex. Does anyone know how to set MS Word cursor position to end of document using ActiveX?

 

Thanks in advance.

0 Kudos
Message 1 of 4
(3,485 Views)

There's a VI that comes with the Report Generation Toolkit called Word_Get_Range. An input to this is the Insertion Point, which has End of Document as an option.

This is what that case looks like:

Word Get Range.png

 

You can use the Range that has been output to insert text or whatever you'd like to do. I'm not sure which method you would use for what you're trying to do, but I know I've replaced text before with the input "^c" to replace with clipboard data.

 

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 2 of 4
(3,466 Views)
Solution
Accepted by topic author IanR

Many thanks James this solution works pefectly.

0 Kudos
Message 3 of 4
(3,437 Views)
No problem. You shouldn't really make your response to the answer as the solution, because it's not.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 4
(3,428 Views)