
Insert a document into another document with a Form at startup
Hi Astrid,
Ja klopt, lastig he dat Engels??
Thanks again!
Because the coverpagetemplate is also being used seperatly, I was hoping
there was a way to use the coverpagetemplate on its own as well as in the
reporttemplate.
But it seems that is n't possible, so i'll do it your way!
Thanks.
Ellen
Quote:
> Hi Ellen,
> Ook uit Nederland he?
> I think the easiest solution is to store the coverpage inside an
> autotextentry. Just add the bookmarks and everything in it.
> In your template built two userforms, one for the coverpage and for the
> report. In your autonew macro either
> - start with asking first if the user need a cover page, if yes, show both
> forms and fill the entire document
> or
> - start the form that builds the report and add a button to the toolbar
that
> starts a macro that inserts the autotextentry of the coverpage as the
> startposition of your document and shows the form to fill it.
> Hope this helps,
> regards,
> Astrid
> So that all can benefit from the discussion, please post all follow-ups to
> the newsgroup.
> Visit the MVP Word FAQ site at http://www.*-*-*.com/
> > Hi Astrid,
> > Thanks for your answer.
> > Let met start with explaning what I want.
> > I have a template with a userform for making a cover page. I also have a
> > template for making a report. Sometimes this report needs to start with
> the
> > coverpage.
> > So I want to make a button in the reporttemplate to insert the
coverpage,
> > with userform to fill out the coverpage.
> > I could make a button to start a new document based on the
> > coverpagetemplate, but I want the coverpage to be saved in the report
> > document.
> > Ik hope I made myself clear!
> > Thanks
> > Ellen
> > > Hallo Ellen,
> > > Your observation is correct, the file_new event isn't triggered when a
> > file
> > > is inserted instead of opened.
> > > The suitable workaround would depend a bit on why you need two
documents
> > in
> > > the first place. Can't you just use autotext for example?
> > > Otherwise the path to explore would be to take over Word's builtin
> command
> > > Insert - File by creating a macro named InsertFile with your own code.
> > > You could create an invisable document that the user picked from the
> > dialog,
> > > get it's attached template path and filename and start your macro from
> > > there. All this is possible with VBA but is not a real straight
forward
> > > task. I don't know how familair you are with VBA but maybe these links
> > would
> > > be a good place to check some things:
> > > "Intercepting events like Save and Print"
> > > http://www.*-*-*.com/
> > > "How to open a document invisibly to the user"
> > > http://www.*-*-*.com/
> > > "Getting help with calling Word's built-in dialogs using VBA"
> > > http://www.*-*-*.com/
> > > Once again all this is possible in theory but if it's the right way
> really
> > > depends on what it is you're after. Maybe you can post back with a
more
> > > detailed explanation?
> > > Hope this helps,
> > > Groeten!
> > > Astrid
> > > So that all can benefit from the discussion, please post all
follow-ups
> to
> > > the newsgroup.
> > > Visit the MVP Word FAQ site at http://www.*-*-*.com/
> > > > Hi,
> > > > I work with Word97 and I want (in VBA) to insert a document (or
rather
> a
> > > > document based on a template) into another document.
> > > > The document/template which i want to insert has a form when
> > > opening/adding
> > > > it. But when I insert this option (Document_new/open) does n't seem
to
> > > work.
> > > > Can anybody help me?
> > > > Thanks,
> > > > Ellen van S{*filter*}is