One formatting change changes all formating in a document

J

jdj1974

This is a common issue on these posts... I change the formatting of one
paragraph (e.g. bold) and the entire document reflects the same
formatting change (whole doc goes bold). Apparently, it's the Normal
style automatically updating. Supposedly, I just have to uncheck this
feature in format/style/modify. But that options IS unchecked...always
has been...and still does it. Any ideas?

Why do I get all the anomolies?!?

-j
 
J

jdj1974

Thanks for the detailed response John. It's still slightly Greek to me.
Am I supposed to run the macro on a blank document or one of those
manifesting the problem? And if I do that, I get a window that says,
"Compile Error: Expected End Sub." Is that the beep you were talking
about? And what does it mean to "fix that style"?

Is there any way to just "reset" my styles to some sort of default? Or
reinstall Word?

thanks,
-j
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi John:

Yeah, "Inheritance" in an object-oriented application is a very complex
subject, so it will take a bit of time to assimilate it all. Hang in there:
the journey's worth it :)

This is "not" a Word problem, so re-installing Word will only waste your
time. It will not have any effect on what you are seeing.

You could fix the problems for FUTURE documents by making a new default
template to create them from. However, it would be better to fix your
existing template, so that you do not lose your customisations.

If you do not choose a different template when you create a new document,
Word creates each document as a copy of your Normal template. You can
re-name the Normal template. If you do this with Word closed, it will
create a new blank default Normal template when it next starts up. In that
template, Normal style will not be set to Automatically update. But several
others will be. I don't think that's worth doing.

For any existing document, the template does not come into play: once the
style definitions are copied into the new document when it is created, Word
makes no further reference to the template for STYLES. So you need to fix
each individual document.

One way to do that is to fix the first document, then use Organiser to copy
its styles to all the other documents. You can look up Organiser in the
Word Help: it's a very powerful tool, which they hide from new users because
you can do awesome damage with it if you are careless :)

The error you saw "Compile Error: Expected End Sub." simply means you missed
a line when you copied the macro. There's a new copy below: notice that the
last statement, on a line by itself, is "End Sub". That must be there, to
tell the compiler where the program ends...

OK, below is a new version of the macro. If you display this post in HTML,
you will see that it has coloured lines in it. The green line is currently
inactive, because it has been ³commented out² by placing a single apostrophe
at the beginning.

In this format, the macro will ³find² each style that has ³Automatically
update² turned on. It will beep, display the name of the style, and stop to
allow you to correct the problem.

However: if you remove the Œ character from the front of the green line, AND
delete all the red lines, the macro will then run through the entire style
table in the document without pausing, and switch ALL styles to
non-auto-update. This change will happen almost instantly and the macro
will give no indication that anything has happened. If that was your
problem, this will fix the whole document in one click :)

You can then set the formatting the way you want it, and it will stick that
way. Get into the habit of using a different style for each ³kind² of
paragraph in your document. Hint: make up styles based on the kind of
paragraph you would use them on, not the formatting they contain. So:
³Body Text², ³Heading 1², ³List Number² etc. You will find that Word
contains a large selection of styles already built-in: those three are
amongst them. The more styles you have, the finer-grained your control over
your document formatting.

Get out of the habit of applying formatting directly to text: that just
makes work for you. Each time you want to change the formatting, you have
to track down each place it¹s used and change it. By using styles, if you
want to change the formatting, you change it once in the style and the
entire document changes with a single click.

The problem you have is because that mechanism is operating when you don¹t
want it to, because your base style is set to ³Automatically Update². This
means that whenever you change the formatting of any paragraph formatted
with the style in question, Word updates the style definition to incorporate
your change. If the document is using only one style, when that happens the
whole document changes.

Here¹s the macro:

Sub findAutoUpdate()
' Finds AutUpate styles
' Macro written 21 Feb 2006 by John McGhie

Dim aStyle As Style

For Each aStyle In ActiveDocument.Styles
If aStyle.Type = wdStyleTypeParagraph Then
If aStyle.AutomaticallyUpdate = True Then
Œ aStyle.AutomaticallyUpdate = False
MsgBox aStyle.NameLocal
Beep
End
End If
End If
Next ' astyle

End Sub



Thanks for the detailed response John. It's still slightly Greek to me.
Am I supposed to run the macro on a blank document or one of those
manifesting the problem? And if I do that, I get a window that says,
"Compile Error: Expected End Sub." Is that the beep you were talking
about? And what does it mean to "fix that style"?

Is there any way to just "reset" my styles to some sort of default? Or
reinstall Word?

thanks,
-j

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 
J

jdj1974

John, I'm still getting a syntax error. After the pop-up, it highlights
in yellow: Sub findAutoUpdate() and highlights in blue: If
aStyle.Type = wdStyleTypeParagraph Then

Sorry if I'm doing things wrong...I'm a total novice with macros.
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi John:

Don't give up: you're one character away from success :)

Make sure the line " Dim aStyle As Style" is there. If it is, then email me
and we'll take this offline...

Cheers


John, I'm still getting a syntax error. After the pop-up, it highlights
in yellow: Sub findAutoUpdate() and highlights in blue: If
aStyle.Type = wdStyleTypeParagraph Then

Sorry if I'm doing things wrong...I'm a total novice with macros.

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 

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