09-17-2015 11:47 AM
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.
Solved! Go to Solution.
09-17-2015 02:11 PM - edited 09-17-2015 02:13 PM
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:
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> ---'
09-18-2015 05:08 AM
Many thanks James this solution works pefectly.
09-18-2015 07:18 AM
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'