3
0
I have a document "template" (not yet a template file type - I hope to create that as described below) for a report. The report is broken up into different sections:
Letter to the Client
Table of Contents
Section I
Title Page
Body
1.0
2.0
Section II
Title Page
Body
1.0
2.0
Appendix A
Title Page
Body
Appendix B
Title Page
Body
Each major "metasection" (Letter, Sections I and II, Appendices) has different formatting requirements. In order to avoid having a huge number of styles (e.g. Normal - Letter
, Normal - Sections
, Normal - Appendices
), it would be nice if I could have the same style name be different depending on which section of the document it is found in. Or said another way, I would like for a document to have multiple style sets depending on the section.
An example of what I am after: for the Letter
section I would like Normal
to be 10 pt Times New Roman, but in Section I
and Section II
, I would like it to be 11 pt Garamond. Or as a second example: the Title
style should be left aligned on the letter, but centered in the appendices.
Is there a way to accomplish this?
EDIT:
From the comments below it seems like VBA would be the only option to do this. My initial idea on how this could be done would be:
- The user simply applies the
Normal
style,Title
style, etc, as necessary. - The VBA code would be written so as to have a style registry of corresponding
Normal
s andTitle
s, etc., for each document section (Normal 1
,Normal 2
, etc). - Write a routine which iterates through the styles being used in the document, selects all the parts with that style, and applies the style from the registry depending on the section.
- The routine is executed with a simple command button, or when the document is saved, or printed.
Any further additional suggestions or alternative ideas on this are appreciated.
(Apologies if this has been asked before; I searched for a similar question but couldn't find one. )
If you keep the separately formatted sections in different files, there are Word add-ins that claim to retain the formatting. Using Word to merge them directly will mess up the formatting. – mpez0 – 2015-02-24T20:33:57.250
1If you already have a template with the correct formatting, why do you need to change anything? – harrymc – 2015-02-25T08:23:12.840
@harrymc What I actually have is a mess (just a .docx document with all the correct formatting, but doesn't use styles, and that I am loosely referring to as a "template"). I am working with people who are unfamiliar with styles and it will be difficult (if not impossible) to get them to use
Normal-Letter Page
andNormal- Main Sections
andNormal - Appendices
. Just not going to happen. But I might be able to get them to click onNormal
,Heading 1
,Title
, etc. – Rick supports Monica – 2015-02-25T14:17:35.403@mpez0 Thanks for the suggestion, but separate files would just cause other problems. – Rick supports Monica – 2015-02-25T14:17:57.237
I think that only a VBA macro can do the job, meaning that your template will use the Normal style, and the macro will selectively change it to Normal-Letter etc. by section. One question will be when to execute that macro and whether a reverse-macro is also needed. – harrymc – 2015-02-25T14:22:58.663
@harrymc I was afraid of that. I've done a lot of VBA programming in Excel but not Word, though I know they're similar. However, this sounds pretty onerous. :( I suppose the simplest thing to do would be to make a button that applies the styles when clicked- I guess that wouldn't be too hard. And when clicked again it could go back to the "regular Normal". – Rick supports Monica – 2015-02-25T14:34:12.350
Word VBA is normally in a better shape than that of Excel. If you have lots of experience with VBA, then you are better qualified than me for the job. – harrymc – 2015-02-25T18:03:22.223
this may be of use – Raystafarian – 2015-03-02T18:42:51.973