Consulting

Results 1 to 2 of 2

Thread: Table of contents Macro

  1. #1
    VBAX Regular
    Joined
    Jan 2019
    Posts
    9
    Location

    Table of contents Macro

    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)

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    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.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •