To expand sub documents when activating a document

  • Thread starter Thread starter Sandeep
  • Start date Start date
S

Sandeep

Hi,

I am opening a document from my c# code. The document
itself is containing two subdocuments. When I activate the
document to open it, it gets opened but the subdocuments
in it appear in hyperlind and not in expanded mode.
I have however explicitly stated the following code to
expand all subdocuments, but failed-

aDoc.ActiveWindow.ActivePane.View.Type =
Word.WdViewType.wdOutlineView;

WordApp.ActiveDocument.Subdocuments.Expanded = true;

Can anyone suggest whatz wrong with that.
How to get subdocuments expanded when opening the master
document.


Thx.
Sandeep
 
Hi Sandeep,

Why do you use aDoc in the one line and
WordApp.ActiveDocument in the other? Stick to the document
object variable and avoid ActiveDocument (and Selection) like
the bubonic plague...
I am opening a document from my c# code. The document
itself is containing two subdocuments. When I activate the
document to open it, it gets opened but the subdocuments
in it appear in hyperlind and not in expanded mode.
I have however explicitly stated the following code to
expand all subdocuments, but failed-

aDoc.ActiveWindow.ActivePane.View.Type =
Word.WdViewType.wdOutlineView;

WordApp.ActiveDocument.Subdocuments.Expanded = true;

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)
 
Back
Top