View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default Attach template does not copy contents

Hi ?B?U3VraGk=?=,

When you attach a template, the only thing that happens is that your document
links to the AutoText, macros, toolbars and keyboard shortcuts stored in the
template. Optionally, you can also pick up the template's styles.

What does NOT happen (and there is no facility in Word for this) is bringing
across anything contained in the TEXT. That only happens when you create the
document from the template.

Perhaps what you need is InsertFile? Or to save the additional text as
AutoText entries and insert those?

I create new document from custom build template -- "objWord.Documents.Add
Template:=strPath....

Then I need to add some more text to document depending on certain
conditions, which I saved as 3 different templates (couple of pages each).

When I attach template:--
objWord.selection.insertbreak wdpagebreak
objWord.ActiveDocument.AttachedTemplate = Template name

I dont see any of my text. However, if I am creating new document with any
of above templates, its ok.

I need to have all of it in one document, starting new page for each
template, because user just need to press print and post.
please be rest assured that your help is greatly appreciated.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)