View Single Post
 
Old 03-14-2022, 12:40 AM
TheBigBoss TheBigBoss is offline Windows 7 32bit Office 2010 32bit
Advanced Beginner
 
Join Date: Dec 2016
Posts: 56
TheBigBoss is on a distinguished road
Default Ensure macro only run for specific table or table in page 1

Hi there!

I have a basic macro that changes table properties (lines, width, etc.) of the first FOUR tables found in the document which form a masthead (see below)

It works great... but what about document not having the masthead, the macro will still run and mess up the four first tables found in the document.

I am using to Selection.Information(wdActiveEndPageNumber) to check that that tables are in page 1

However, I wonder if there is any better option.
I saw "ID" under "Table", can table be given an unique ID or name? Or any identifier?

Thanks
Reply With Quote