Identify Tables

C

Carim

Hi,

I am dealing with a document which contains 4 different types of
tables.
Since each type of table triggers a different set of actions, is there
a way to test tables with a unique identifier, which would categorize
them ?
Thanks in advance for your comments

Cheers
Carim
 
W

Word Heretic

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

best method is to always include table caption before the table and
read that. Failing that, bookmarks work ok. Eg, bookmarked with a
prefix of GL means General Ledger results.



Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Carim reckoned:
 
C

Carim

Hi Steve,

Thanks for your input.
So far, my code loops through all the tables, extracts all cells and
copies nicely to Excel ...but I need to refine it with table
identifiers ...
Is there a simple way to programmatically create 4 types of table
captions or 4 types of bookmarks for something like 500 tables ?
Thanks for your help
Carim
 
W

Word Heretic

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

Sorta

Dim NextVictim as Table
Dim Serialiser as Long

for each Nextvictim in activedocument.tables

that gets you looping through all tables

if nextvictim.someproperty = identifableResult then
add my caption,append the serialiser
else
add another caption, append the serialiser
end if

serialiser = serialiser +1

next


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Carim reckoned:
 
C

Carim

Hi Steve,

Thanks a lot ...
Followed your recommendation ... and fixed my problem ...
Thanks again

Cheers
Carim
 
Top