Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Tables / March 2005

Tip: Looking for answers? Try searching our database.

Suppressing AutoClose Macro when Creating TOC Spanning Multiple Do

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Barb R. - 29 Mar 2005 20:05 GMT
I have created a TOC from multiple documents using the RD field code as
described in the following:

"Creating a Table of Contents Spanning Multiple Documents"
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=148

I am contemplating adding an AutoClose macro to the documents referenced by
the RD field code.   Is there a way to suppress the running of the AutoClose
macro when I access the documents using the method described above?

Thanks in advance,
Barb Reinhardt
Jay Freedman - 30 Mar 2005 00:19 GMT
>I have created a TOC from multiple documents using the RD field code as
>described in the following:
[quoted text clipped - 8 lines]
>Thanks in advance,
>Barb Reinhardt

I'm not 100% sure this will work, but try putting the line

  WordBasic.DisableAutoMacros 1

just before the line

  Set oDoc = Documents.Open(FileName:=strCode)

I know it will suppress AutoOpen and AutoExec, just not sure about
AutoClose.

You ought to be aware of
http://www.word.mvps.org/FAQs/MacrosVBA/WordBasicCommands.htm -- it's
very helpful sometimes.

--
Regards,
Jay Freedman
Microsoft Word MVP         FAQ: http://word.mvps.org
Barb R. - 30 Mar 2005 15:27 GMT
That appears to work, THANKS!   I'll look at the link you supplied.  I'm sure
that will help me.

Barb Reinhardt

> >I have created a TOC from multiple documents using the RD field code as
> >described in the following:
[quoted text clipped - 28 lines]
> Jay Freedman
> Microsoft Word MVP         FAQ: http://word.mvps.org
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.