Appending a document to another document

C

Chris

Hi Group,

Is it possible to open a template populate the template through bookmarks
and then append the document onto another word document?

Background

I've written a program in access, a word template will be opened, populated
and saved however not closed.
The user than has other options that will add different pages to the
document. I was previously thinking that the appended page would all have
to be created / formatted through code. But I think it would be simpler to
get the appended page from a template.

I've looked for books on Access - Word VBA and cannot find any. I am also
struggling to find any web resources so any help appreciated.
 
S

Shauna Kelly

Hi Chris

A couple of suggestions:
I've written a program in access, a word template will be opened,
populated and saved however not closed.

I'm not sure I really understand what you're proposing in terms of using the
template and the document. I assume that what you need is to create (in your
Access code) a document based on a certain template, then populate the
document. This might help clarify things:
What is the relationship between a Word document and its template?
http://www.ShaunaKelly.com/word/templaterelations/index.html

The user than has other options that will add different pages to the
document.

I assume that these 'pages' are like boilerplate text. That is, you want to
give the user a choice of several pre-packaged 'pages' of text to include in
his or her document.

If so, then AutoTexts will solve this nicely. For info about AutoTexts, see
Using AutoText
http://www.word.mvps.org/FAQs/Customization/AutoText.htm

AutoTexts can be any length (a word; 10 pages), and contain formatted text
(including tables, images etc). You can create a button on a toolbar to
invoke an AutoText without any code, however for 100% certainty, you can
write some code something like the following, where wdDoc is your Document
and oRange is the Range in Word where you want to insert the AutoText:

wdDoc.AttachedTemplate.AutoTextEntries("My AutoText Name").Insert
Where:=oRange, RichText:=True

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 

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