Storing Child word documents inside Master documents using Word's document objects.

W

Wahaj

Hi All,

I am trying to store a word(Child) document inside another word document
(Master) in such a way that the Child document can't be seen when the Master
is opened (Master and Child will be inside a single file). By default, when
the document is opened, the Master document is shown. The Child will be
shown when I click my Active X's "show child document" menu item. To achieve
this I tried to store the Child document inside my ActiveX but quickly found
that I can't store more than approx 200KB (I may be wrong in the exact size)
of Child document. I then tried to store the Child document inside Document
variable of Master Doc. The Document variable is hidden so seemed OK. I
broke my Child document in chunks of 100 KB and stored in recognizable
Document variables of Master document Object. So far so good. I tried this
on Windows 2000 Server with Office 2003 and it worked but on Windows XP
after creating 2 such Document variables containing the Child documents it
started giving strange data e.g. If the Child document size is 60 KB whle
storing, on retrieving I get 100 KB!! which then crashes by application
while checking. This is only happening in Windows XP Home Edition and
Professional.

Now questions;

1) Is there any other way to store word document inside a word document
programmatically ?
2) Any reason why is it failing to give me the correct data?
3) On programmaticall removal of the document variables, the size of the
Master document remains the same, why ?

Thanks for reading..

Regards,
Wahaj
 
D

Dave Lett

Hi Wahaj,

Instead of thinking Parent/Child, you could have an IncludeText field to
"insert" the child document. You could then bookmark this field and make the
range (in)visible or updated as needed.

HTH,
Dave
 

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