There's no Word function that does this directly, but you could do it using
the Information() function: set a Range to point to your substring, then
check the horizontal position --
MyRange.Information(wdHorizontalPositionRelativeToPage)
Now make a Range that starts immediately after your substring and check its
position: the width of your substring is the difference between the two,
provided you're still on the same line. (You can check the vertical position
to confirm that.)
> How can I compute the length in inches of a substring in a paragraph?
>
[quoted text clipped - 3 lines]
>
> Any help appreciated.
Gary Hillerson - 25 Jul 2005 06:21 GMT
Thanks so much;it worked perfectly, it was pretty easy, and I got to
learn about the Information property.
g
>There's no Word function that does this directly, but you could do it using
>the Information() function: set a Range to point to your substring, then
[quoted text clipped - 14 lines]
>>
>> Any help appreciated.