Adding SubDocuments to Word

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I am using Word 2000 and trying to add subdocuments. The format of the
subdocumemts gets messed up when more than 125 subdocuments are added.
The header and paragraph alignment is messed up. Following is the code
used in my VB app. Any help is appreciated. Thanks.

with objMSWord

.Documents.Open "\proj.doc", , , False

.ActiveWindow.ActivePane.View.Type = wdMasterView

With .ActiveDocument.Subdocuments
.Expanded = True

With objMSWord.ActiveWindow.ActivePane.Selection
.EndKey wdStory
End With

End With

Do While Not grsBuffer.EOF
.ActiveDocument.Subdocuments.AddFromFile (strFileName)
loop

end with
 
The format of the
subdocumemts gets messed up when more than 125 subdocuments are
added.

I can't tell you whether your subs are perfect or not, but I can
tell you that 125 subdocuments is a whole lot, particularly when
Word's master document system is widely reputed to be too buggy
for use. Search Google for newsgroup posts on the topic, or go to
the Word MVP site (not a MS site) for articles on the topic. Way
better to use the INCLUDE field if possible.

(Not to start a fight with anyone here, but--if you really need to
use the master document system--Lotus Word Pro seems to have no
problem with the function, and also has something called
"divisions" in addition to "sections," which is quite helpful.)

In any event, I'd use *some* alternative to continuing with Word
2000 and master documents. Just relaying the consensus opinion of
many who know more than I....
 
Back
Top