Hi,
Thanks again for your reply.
Can you please advice how can we add exception (or kind of validation) so that the following code does not throw error - if there is no table of contents in the document.
Sub AutoClose()
ActiveDocument.TablesOfContents(1).Update
End Sub
|