PDA

View Full Version : Table of contents Macro



MikeAu
01-18-2019, 12:33 PM
I have a document with a generic table of contents. What i want to do is create a macro that would check my document and if one of the title in my generic table isn't in the document it deletes the row of the table. I already did a delete a specific row macro but I have no idea how to do the other part of the macro I want.

Here is the table of contents:



TABLE OF CONTENTS



1.

-List of supplier service manuals



2.

-List of recommended spare parts



3.

-List of recommended pneumatic spare parts



4.

-List of mechanical drawings



5.

-List of pneumatic drawings



6.

-List of electrical drawings



7.

-List of start-up and maintenance verifications



8.

-Mechanical installation instructions



9.

-General maintenance and lubrication instruction



10.

-Air pressures



11.

-Maintenance schedule



12.

-Safety operating procedure for conveyors




per exemple sometimes there are no pneumatic drawings so the List of pneumatic drawings row should be deleted.

I u have any idea just to guide me in this please share

Thank you
(sorry for my bad english, i'm trying my best)

macropod
01-18-2019, 02:35 PM
If you use Word's own Table of Contents field and your table headings use Word's Heading Styles, there's no 'maintenance' to be done; the
Table of Contents field can be updated by nothing more complex than pressing F9 or printing the document - plus it will do so if you add new entries. No macros required.