generating multiple templates

F

Felipe Garcia

I've created one application in C# that generate multiple templates. The
problem is, if i generate the templates one by one, everything works fine,
but when i need to generate multiple templates at once, here comes my
headache. When i generate all the templates and begin to merge all of them
into only one document, the templates losing it's formats such tables,
fonts, and the most important format of them margin and font. I'm doing this
selecting all of the document content, copying and pasting on the final doc.
Before this i've tried to use the inser file method, it almost works, in
this case the templates lose only its margin.

By the way what i need to do is generate multiple docs at once, and before
merge all of them into one final doc. Regarding of each template has your
page format.

How can i accomplish this ?

Thanks
 
J

Jezebel

It's not obvious from this that you are using 'template' in the usual sense.
In Word a template is a special kind of document, normally with no real
content, used as the basis for creating other documents. A foreign
application usually creates documents based on existing templates, rather
than creating templates as such.

Suggest you experiment with Word itself before you trying automating this
process from another app. A Word document has only one template. If you
merge multiple documents, what you end up with has only one set of styles,
derived from that one template.You can use sections within the document if
you need different page set-ups (margins, etc) for different parts of the
document; the templates on which the original document sections were based
are irrelevant for this purpose.
 
C

Charles Kenyon

Following up on Jezebel's post...

If you want different formatting in different parts, use different styles to
express that formatting. The styles for part 2 should not be "based on" any
styles existing in part 1 unless you want the formatting to change if a
change is made in the base style existing in part 1. Likewise, those in part
3 should be independent of all existing styles in parts 1 and 2. Sorry this
isn't clearer.

If you are trying to format things in Word it is essential that you have a
good grasp of how styles work. Otherwise Word will fight you at every step.

You could set up a master template that has styles to handle all of your
formatting and base your new document on that master. (This has nothing to
do with the Master Documents feature which you do _not_ want to even look
at, much less use.) If you format your documents to be imported with styles
having the same names, the formatting for those styles in your base or
master document should apply to the imported text. That is, you don't need
to worry about the style definitions in the imported documents, just the
style names. Hope this helps.
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
F

Felipe Garcia

Sorry, i wasn't clear.
I generate documents from this templates, and then i merge this generated
documents into only one final document.
 

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