07-24-2018 12:54 PM
Hello,
I am using the attached vi (labview 2013) for reading bookmark-values from a word-doc but because the beginning and the end-position of the bookmark-value is at the same position so it returns an empty value.
The size of the value is 4 characters. Is there a way to control the length of the bookmark-value which will be read regardless of the end and start-position of the bookmark?
Thank you and best regards.
07-24-2018 01:56 PM
I haven't tried this to see if it works but get the start of the range at the bookmark, create a new range specifying the start and end (which equals start+4) and then use the range.text command to get the value.
07-24-2018 02:15 PM - edited 07-24-2018 02:25 PM
Hi aputman,
Thank you for the solution. It Is working but only at the second run of the program.
The first run changes the bookmarks at the original document to the new width. The second run of the program then reads the correct value. Just to let you know. I hoped that my original document was not touched and stayed the same but of cause it is not such a big issue.
Regards.
07-25-2018 10:05 AM
Sorry for the delay in getting back to you.
This should work. Rather than modifying the range object, this uses the bookmark range to make a document range that can be selected. Be sure to close all references (which I have not done here).