[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Using Style Sheets with MS Word

Posted on 2012-12-27
5
Medium Priority
?
504 Views
Last Modified: 2013-02-27
Hi All

Seasons greetings :-D  

I'm trying to make a template (.dotm) and anticipate a need for future customization and tweaking... I figured with Word 2010 that I should be looking at using style sheets and XML... I have close to zero experience with either...  a bit of searching on google and EE has not helped much.

I'd like my template to reference an external style sheet (or similar) so that text attributes and page layouts can be specified...

For example I have some data laid out in tables and might wish to change fill colors of the tables, table width, row breaking properties etc.  

Is this possible with Word 2010?

Would love some pointers to get me started...  failing this I guess I'll be creating an .ini file that contains my specifications and using VBA to apply all my formatting (so would appreciate thoughts on the best way forward too....)

Cheers, S
0
Comment
Question by:DrTribos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 21

Accepted Solution

by:
Eric Fletcher earned 2000 total points
ID: 38727189
A template with defined styles will do most of what you want. Certainly anything to do with text attributes is very easily managed by just modifying a style's definition. Page layouts and table row/column dimensions are not managed by styles, but if you have used styles, getting at parts to be modified (either manually, with VBA, or a combination of both) is much simpler.

If you are completely new to Word styles, I'd recommend reviewing Shauna Kelly's excellent tutorials first.

What you will want to do is establish a minimal set of styles to use to tag the different structures within your document. Typically, any document will be made up of headings, variations of a body paragraph (indented, not indented), lists (bulleted, numbered), and, in your case, parts within tables. Consider what attributes are common to the different elements so you can define the styles so that a change to a "master" element can use Word's style "based on" attribute to inherit the common parts. For example, say you set the Body Text style to be 12pt Helvetica, and had a Numbered List style based on it. If you change the Body Text style's definition to use 11pt Garamond, the Numbered List style would automatically change too.

To make changes to table dimensions, you can use Word's Find feature: click the small round button in the lower part of the vertical scrollbar to access the "Select Browser Object" flyout (or press Alt-Ctrl-Home), and choose the Browse by Table icon. This will bring you to the next table in the document, and you can make whatever changes you want. Click the double-down button below the browser object icon to skip to the next table.

The same method can be used to move from one scetion to another to make alterations to the page setup (since this is a section-related function).

Hope this helps get you on the right track...
0
 
LVL 15

Author Comment

by:DrTribos
ID: 38728488
Hi Eric

Thanks for your reply. I'm reasonably good with styles (and have gotten much out of Shauna's tutorials).  I've just started reading up on XML and CSS and doing tutorials at w3schools.com...

For practical reasons I don't really want to modify my template for each different user preference... too much work.  Ideally I would have a CSS (or CSS like file) that specifies styles, table borders, table backgrounds etc.. and any change made to the "file" would be reflected in the document next time it was opened.

I'm aware that there is an issue with MS using custom XML in documents but not sure how this relates to CSS...

At this stage I am thinking that I will need to use bookmarks for tagging...

   [tableTypeA_001], [tableTypeA_002], ... , [tableTypeA_00n]

   [tableTypeB_001], [tableTypeB_002], ... , [tableTypeB_00n]

And use VBA to apply specific formatting to my tables... etc.

Are you aware of any good tutorials out there for starting out with MS Word XML Schemas and/or XML Expansion Packs?  

Cheers,
0
 
LVL 21

Expert Comment

by:Eric Fletcher
ID: 38728787
Interesting idea... No, I'm not aware of any tutorials, but will certainly follow this thread to learn about them if they are available.

I don't use the built-in themes in Word, but perhaps they may use some sort of CSS to manage the various effects.
0
 
LVL 15

Author Comment

by:DrTribos
ID: 38729860
Thanks Eric - will be interested myself  ;-)
0
 
LVL 15

Author Closing Comment

by:DrTribos
ID: 38936880
Hi Eric,

Closing this... thanks for your comments :-)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question