Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Word / February 2006



Tip: Looking for answers? Try searching our database.

One formatting change changes all formating in a document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jdj1974@gmail.com - 21 Feb 2006 06:37 GMT
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
John McGhie [MVP - Word and Word Macintosh] - 21 Feb 2006 10:40 GMT
You get the annomalies because you're so special :-)

We've been a bit economical in our treatment of this topic recently, because
99.9 per cent of the time in this newsgroup it *is* "Automatically update"
and it *is* Normal style.

However, "Automatically update" can be applied to "Any" style, not just
Normal style.  And "most" styles have a "based on" property.  This is
"usually" Normal style, but it doesn't have to be.

In documents prepared in workgroups, particularly those prepared by print
industry professionals, that last tenth of a percent starts to matter,
because they are likely to use the full range of Word's capabilities.

So:  The formatting of the text at any point is a combination of direct
formatting, the underlying style, and the inherited properties from the
"based on" properties of all the styles in the chain.

In one of my documents, Heading 1 and Body Text will be based on "No style"
to prevent any unanticipated knock-on effects.

Heading 2 will be based on Heading 1, Heading 3 on Heading 2, Heading 4...
You get the picture.  Any change to Heading 1 will ripple all the way down
to Heading 9.

In a standard document, EVERY style is based on Normal style.  Any change to
Normal style will ripple through to the whole document.

Experienced print professionals break the link to Normal style for
everything in their Normal template, before they create any documents.  They
also switch "Automatically update" off for all styles.

If you get a document where this has not been done, then "Automatically
update" can cause real havoc, particularly if it is left enabled for a
high-order style such as Normal.  To solve this problem, you will need to
work carefully back through the style chain to see which styles are based
upon what, and which ones have "Automatically update" enabled.

The principle is the same: but in a non-standard document it merely becomes
a little more complex to unpick it.

The following macro will help: it stops and beeps at the first style it
finds with Automatically Update turned on.  Fix that style, then run the
macro again.  Don¹t worry about the TOC styles ‹ if you use one of the
predefined TOC formats, these must be set to Auto Update because that¹s how
Word applies the TOC formats.

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
           MsgBox aStyle.NameLocal
           Beep
           End
       End If
   End If
   Next ' astyle

End Sub

See http://word.mvps.org/mac/installmacro.html

Cheers

On 21/2/06 5:37 PM, in article
1140503852.308084.268270@g44g2000cwa.googlegroups.com, "jdj1974@gmail.com"

> 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
[quoted text clipped - 6 lines]
>
> -j

Signature

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

John McGhie <john@mcghie.name>
Microsoft MVP, Word and Word for Macintosh.  Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

jdj1974@gmail.com - 22 Feb 2006 06:01 GMT
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
John McGhie [MVP - Word and Word Macintosh] - 22 Feb 2006 08:11 GMT
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

On 22/2/06 5:01 PM, in article
1140586199.290371.210560@g47g2000cwa.googlegroups.com, "jdj1974@gmail.com"

> 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
[quoted text clipped - 7 lines]
> thanks,
> -j

Signature

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

John McGhie <john@mcghie.name>
Microsoft MVP, Word and Word for Macintosh.  Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

jdj1974@gmail.com - 24 Feb 2006 00:03 GMT
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.
John McGhie [MVP - Word and Word Macintosh] - 25 Feb 2006 07:07 GMT
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

On 24/2/06 11:03 AM, in article
1140739392.251809.144900@z34g2000cwc.googlegroups.com, "jdj1974@gmail.com"

> 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.

Signature

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

John McGhie <john@mcghie.name>
Microsoft MVP, Word and Word for Macintosh.  Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.