Turn off automatic formatting when document is opening

M

music_Pete

I have applied outline levels to my document so that I can easily navigate through its hundreds of pages using the document pane. In other words, i have created an outline using the outline levels. When I open the document, Word automatically adds outline levels to many paragraphs which I have set as body text (i.e. no outline level). It is very maddening to have my easy navigation destroyed each time I open the document. How do I turn off this formatting which happens immediately when I open the document? I have all of the auto format as you type boxes dechecked. Any suggestions?
 
D

Daiya Mitchell

Various approaches here:
http://word.mvps.org/faqs/general/DocumentMap.htm
(hit reload a few times in Safari if page comes up blank)

But if you are using Word 2008, the macro at the end will not work. You
didn't state your version--and it depends on whether you manually
applied outline levels or used styles to do so, also (it's best to use
the built-in heading styles for this purpose).

Rumor has it that making sure the *first* line in the document is
formatted with Heading 1 style may prevent Word from doing this, in
later versions.
 
M

music_Pete

Thank you. I should have included the version: I just updated to Office 2008 for Mac. I have used styles to apply the outline levels. It does not change anything other than elevating body text outline level 1. That is, Word does not change a level 1 to a level 2 heading or a level 3 to some other level. It only seems to change body text levels to some other outline level (actually it seems to be only level 1 which is applied), which as noted in the document you mentioned serves to add an awful lot of junk to the Document map, making it a mess. I tried formatting the first line with Heading 1 style, to no avail. It still added outline levels to many paragraphs of body text.

The other suggestions in the document I could not figure out how to follow. I could not find how to display field codes. The shortcut given did not work. I also could not find a Reset Paragraph function as mentioned. I have searched the Word Help (which seems much much more paltry in this latest version of Word) and have not been successful in finding a solution. Please send more suggestions!
 
D

Daiya Mitchell

Cmd-Option-Q didn't work? Hmm. It's behaving here.

Okay, I'll put out feelers to try to get the macro translated into
AppleScript, which would fix it in a single-click, once installed, and
then you could just run it again whenever you needed to. Might take a
little while though.

For immediate action, you can go through this rigamarole:

Go to View | Customize Toolbar, select Commands, select All Commands in
the left column, then tab to the right column. Type "res" to jump to the
Reset section and you will find ResetPara. You can drag it to a toolbar
to use it. (Or, I guess use Tools | Customize Keyboard to re-assign
ResetPara to something).

You'll probably need to use ResetPara on each misbehaving paragraph,
unless you used styles so consistently you feel safe doing a Select All,
ResetPara. ResetPara will ignore character formatting like bold or
italic, I believe.

Once you have it sorted, unfortunately, the only workaround I can find
to prevent it happening again is to make sure you *close* the navigation
pane before closing the doc. Also make sure the navigation pane is not
open in a different document when you re-open the doc. If the nav pane
automatically opens, then the outline levels are applied with no Undo.

However, if you manually go into the nav pane, and the outline levels
are applied, then you can use Undo to undo the AutoFormat that applied them.

I was testing with a .docx, but I doubt it matters.

I don't think displaying field codes will help you--that's only if you
just need to fix a Table of Contents--but it's in Word | Preferences |
View, for future references.

Help is unfinished, but as it is online, it will be updated over time.
 
D

Daiya Mitchell

Hi Steve--

Got you sorted, with lots of help from MVP Paul Berkowitz, who wrote a
new script to use in Word 2008 instead, of the macro. You can re-run the
script anytime the Doc Map starts showing incorrect headings, and it
should fix it immediately.

Here's instructions on installing an AppleScript:
http://word.mvps.org/Mac/InstallApplescript.html

Here's the script you need, see the link above for what to do with it--
*tell* application "Microsoft Word"
*set* theParas *to* (*every* paragraph *of* active document)
*repeat* *with* i *from* 1 *to* count theParas
*set* myPara *to* item i *of* theParas
*tell* myPara
*set* *its* outline level *to* (outline level *of* *the*
paragraph format *of* *its* style)
*end* *tell
* *end* *repeat
end* *tell*
 
D

Daiya Mitchell

IGNORE PREVIOUS POST WITH SCRIPT!

Oops--I meant to say Hi Music_Pete--also the previous script is
incorrect--Thunderbird added a lot of stars. There should not be any stars.

Here is the correct script:

tell application "Microsoft Word"
set theParas to (every paragraph of active document)
repeat with i from 1 to count theParas
set myPara to item i of theParas
tell myPara
set its outline level to (outline level of the paragraph
format of its style)
end tell
end repeat
end tell

Here's instructions on installing an AppleScript:
http://word.mvps.org/Mac/InstallApplescript.html
 
M

music_Pete

Thank you for the AppleScript. The first and second time I tried using it, the little pinwheel came up and continued spinning while Word seemed to freeze. I forced Word to quit. I tried it a third time and just let it spin and spin. After a quite a long time it did finish and had completely fixed everything--all the outline levels were set as they should be, as defined by the paragraph style.

The suggestion about opening documents with the document map off is also a good one. That way there is usually an undo Auto Format option in the edit menu after turning the document map on.

Thank you for all your help. I am very amazed and thankful at how quickly you responded! I wonder if the title of my post couldn't be amended to included "document map" so if anyone else does a search for this subject they'd be able to find it?

Again, thank you!
 
D

Daiya Mitchell

Hmm. The script worked great here, not slow--but maybe something got
lost in translation. If you see this (I was out of town for a bit)--can
you post your OS version? Glad it worked eventually.

Re search--changing the title is probably not possible--at present
search is a bit broken and should be fixed soon, but a good search
should bring this thread up under document map anyhow, and your subject
should actually attract people who don't know the doc map is the problem.

Glad to help--it's nice to get problems with solutions. :)
 
M

music_Pete

I'm using version 10.5.2. When I ran the script, it was on a document with 100+ pages, about 80 of which which Word had applied outline level 1 to every paragraph (which on these 80 pages, was each line). In other words, there were quite a few paragraphs to reset!

Glad to know that search is broken. No wonder I haven't been able to find much using it!

Thanks again for your help.
 
D

Daiya Mitchell

I did run it on my 1 page dummy document, so maybe it is just slow.
Thanks for the OS confirmation--I'll just make a note it's been tested
in that OS also.

Glad to know that you really needed the script, as it required a little
effort (from Paul Berkowitz, not me) to produce.
 
M

music_Pete

Thank you and thank Paul, too. I appreciate his and your efforts to get this solved.
 

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