03-09-2010 03:42 PM
How do I correlate the start and end index values to a position or coordinate in a word document?
Is there some type of lookup table that will reference a value of say "35" (for start) to a particular character or line position in a word document? There is nothing in the LV help that explains anything but the value of "-1".
Solved! Go to Solution.
03-10-2010 12:53 AM
Hi JayB,
can you please explain a bit more? What do you try to do? Do you use ActiveX?
Mike
03-10-2010 06:30 AM
I am using the Report Generation VIs to create a data sheet as a word document. I am using the Word Format Text VI to format the Top row of text in the document. I only want to format this row and not the entire document so I need the use the start and end indexes of this vi. I know you can use numbers to select a certain region of the document but I do not know how the numbers map/correlate to the document. The help state -1 for either one with select the entire document but I do not want to do this.
03-10-2010 03:01 PM
Hey JayB,
The Start and End values of the Word Format Text.vi are the character positions within the document. The values start at 0 on the first character(or ASCII character like a space, tab, or carriage return) and increment for each character (or ASCII character). So, for example if I wanted to bold the word "Carrots" in this the list below, where the values start at 0 on the word "Groceries"
Groceries:
Apples
Black Berries
Carrots
Detergent
Then I would enter a start of 33 and an end of 40, making sure to count the carraige returns and spaces.
Hope this helps.
Logan H
07-16-2024 04:16 PM
Hi Logan H,
I know this question is pretty old, but I have not found anything closer to what I need. I need to format the color of text in a word report. With this method I would have to track the character count of everything entered via bookmarks then shift based on where in the template I would like to format the text. Is there a way to index off of a bookmark to figure out your starting index to format the text of the bookmark?
V/r,
Matt