Word: How to find out if cell is selected?

A

Andrew Sheshko

I'd like to iterate through all Tables in Selection object. So how to detect
if cell is selected?
 
C

Cindy M -WordMVP-

Hi Andrew,
I'd like to iterate through all Tables in Selection object. So how to detect
if cell is selected?
I don't understand exactly what you want. Do you want to know whether the
selection is in a table? Or do you need to know in which cell it is? You need
to be more specific...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
A

Andrew Sheshko

I'd like to iterate through all Tables in Selection object. So how to
detect
I don't understand exactly what you want. Do you want to know whether the
selection is in a table? Or do you need to know in which cell it is? You need
to be more specific...

Thanks for your responce. I just want to get First and Last column and row
indexes of selection in a table. That was solved using
Selection.Information(...) with parameters: wdStartOfRangeColumnNumber,
wdStartOfRangeRowNumber, wdEndOfRangeRowNumber, wdEndOfRangeColumnNumber.

Best reagrds,
Andrew Sheshko.
 
E

Edi

Hi Cindy,

Im having almost the same problem...
Im trying to get the Cell position from the Selected/Range.Selection etc.

table.Range.Sections[0]...

but still cant get the right result

thanks
Edi
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?RWRp?=,
Im having almost the same problem...
Im trying to get the Cell position from the Selected/Range.Selection etc.

table.Range.Sections[0]...

but still cant get the right result
Cell position, as in column and row index? There should be ColumnIndex and
RowIndex properties for the Selection.Cells object/collection, as well as
the Selection.Information property if you're dealing with multiple cells.

.Sections is not directly valid for tables; it's more at the document level
(section breaks).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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