Using VBA to work with the table object

S

Scorpion_One

I have a document that contains several lengthy tables in which the user will
enter data. The keybinding for the pause key has been changed to call a macro
to process this data. I need a method to programmatically determine which
table contains the insertion point so that the appropriate sub can be called.
One would think something similar to .rowindex or .columnindex would exist
but I have not be able to find such a property or method.

Any help would be greatly appreciated.
 
J

Jonathan West

Scorpion_One said:
I have a document that contains several lengthy tables in which the user
will
enter data. The keybinding for the pause key has been changed to call a
macro
to process this data. I need a method to programmatically determine which
table contains the insertion point so that the appropriate sub can be
called.
One would think something similar to .rowindex or .columnindex would exist
but I have not be able to find such a property or method.

Any help would be greatly appreciated.

This article tells you how to do that

Determine the index number of the current paragraph, table, section ...
http://www.word.mvps.org/FAQs/MacrosVBA/GetIndexNoOfPara.htm
 
H

Helmut Weber

Hi Scorpion_One,

the table with the insertion point is
selection.tables(1).

You may find
Selection.Information(wdWithInTable)
helpful, too.

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 

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