Making subdocuments expanded by default

B

Bruno

Hello,
does anybody know how to make subdocuments automatically expanded when I
open a master document ?
Thanks in advance,
Bruno.
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Bruno,

The following code in an autoopen macro should do what you want

If ActiveDocument.Subdocuments.Count >= 1 Then
ActiveDocument.Subdocuments.Expanded = True
End If

I have never tried it as I have never needed to create a MasterDocument

I would suggest that you see the article “Why Master Documents corrupt” at:

http://word.mvps.org/FAQs/General/WhyMasterDocsCorrupt.htm

and for later, the article “How to recover a Master Document” at:

http://word.mvps.org/FAQs/General/RecoverMasterDocs.htm


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top