Give Word table an id?

Mandark

New Member
Joined
Mar 18, 2014
Messages
43
I have a Word document with multiple tables. In each of those tables, I have multiple labels.

Then, I have a macro, that loops through all the labels and I would like to it look at the name of the label and name of the table. From this information, it will look into excel file and locates the correct cell data to fill in the label caption.

The problem is, that I do not know how to populate the names for the tables. At this moment, if I ask for the table.id or table.title, it is blank. If I fill the id with VBA, save the file, close it and open it, the id is empty again.

Any idea how this can be done?
 
Last edited:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Re: How to give Word table an id?

Second question:

How do I loop using a Word macro through all open Excel workbooks?

The classical

Code:
for each wb in Workbooks

or

Code:
for each wb in Application.Workbooks

is not working.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,457
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top