Auto-applying a style in Word

2

Lets say that I have a large word document (100+ pages) and I'd like to build a table of contents.

The first line of each page has the section heading I want, but the style that I'm using to build my TOC has been inconsistently applied.

Is there any way I can automatically apply a style to the first line of every page, or maybe to all text with font size > 14?

About Macros: I'm personally cool with solutions that require a Macro (I don't know word macros, but I'm a programmer by trade so I imagine I could figure it out). I'd like to be able to show this to people who aren't programmers though, so a non-macro solution would be optimal.

Version: Ideally, something that works in 2003 and 2007, but something that works in either one of those would be an improvement on the status quo.

Ryan

Posted 2009-09-23T15:20:12.060

Reputation: 1 728

Which version of word are we talking about? – Col – 2009-09-23T15:42:44.543

Joe, if there's a way to do what I want to do on the "modify styles" dialog that you pointed out in that question, I can't figure it out. Would you care to elaborate? – Ryan – 2009-09-23T16:39:18.937

I think if you do the modify styles it will affect the document globally not just at the top of each page. So you would select the style called normal+14pt and change it so that it was you're proper style. – Col – 2009-09-24T07:27:04.587

Answers

2

You should be able to use the Find and Replace dialog to search for text with whatever attributes you're interested in and then use the advanced options to set the style of the replacement text (using the Format drop-down's Style option).

You can replace the found text with itself, so in effect you're just applying the style.

If you're going to need to do this multiple times, you could record it as a macro and play it back.

swref

Posted 2009-09-23T15:20:12.060

Reputation: 293

1

The Format Paint Tool can be double clicked to keep it active for multiple uses. You could copy the format that you want and apply it to the text on each page.

It's not nearly as elegant as creating a macro but it is significantly easier.

When you are finished press the ESC key to cancel the Format Paint Tool.

Zooks64

Posted 2009-09-23T15:20:12.060

Reputation: 1 938

0

It could certainly be done with a macro but I'm not sure it could be achieved any other way.

Col

Posted 2009-09-23T15:20:12.060

Reputation: 6 995

I edited a note about macros into the OP – Ryan – 2009-09-23T15:31:13.677