Thread: [Solved] Update TOC
View Single Post
 
Old 08-14-2012, 11:12 PM
ubns ubns is offline Windows 7 32bit Office 2010 32bit
Competent Performer
 
Join Date: Apr 2012
Posts: 177
ubns is on a distinguished road
Default

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
Reply With Quote