How does start work on a table selection

J

James

I have a document which consists of one word, paragraph ender (or
whatever it's called), then a table. If I select the table, and in my
code:
Set TableRange = Selection.Tables(1).Range
If TableRange.Start > 0 Then
tablerange.start seems to be including the word preceding the table.
Can someone explain to me how either the start or selection
property/object works that this would occur?
 
W

Word Heretic

G'day "James" <[email protected]>,

What you are describing is not what should be happening.

The start of the table range will be the same as the end of the first
paragraph because the 'offset' is not actually a character, it is a
position BETWEEN the characters. So Characters(1) is from range
positions 0-1. Range n-n is always null.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


James reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top