View Single Post
 
Old 04-13-2020, 05:43 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by jpl View Post
Another subject of perplexity, it is this time about the relation between the Selection and Range objects inside a Word table (Table object).

...
First problem: the Range object contains six cells, but when it is selected, the selection contains only two instead of the six that one might hope for. When you select a Range in a Table object, it would seem that the selection is not the Range area, but a rectangular area based on the extreme cells of the Range.

If I select the first column, the Selection object contains two cells, the Plage object contains six, which is consistent with the previous result.
[I]Second problem: Sections 3 and 4 indicate that the Plage object contains 6 cells, but they only find 5 cells to display. Section 4 generates an error message indicating that the Plage.Cells (6) cell does not exist. What happened to my ghost cell?[/I
When you define a range within a table, the range goes horizontally from the first designated cell to the end of the row before going to the next row, starting at the first cell in that row, and so on, until the last designated cell is reached. This is quite unlike how a Selection works. As for the 'ghost' cell, you have encountered a Word VBA bug.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote