#1
|
|||
|
|||
Corrupt Custom Paragraph Styles
Greetings,
First, let me apologize if this is a duplicate. We had a power glitch as I tried to post this and my laptop froze. I don't know if it went through. I’m pretty handy with Word although I wouldn’t call myself an expert. I’ve run into a problem that I cannot solve, hence my posting. My employer has us all using Office 365 (much to my disgust) so I have whatever today’s current version of Word 16 is. I have documents in the .docx format that we use as templates for standardized process instructions. We use .docx instead of .dotx to maintain positive revision control. We are transitioning to a new document control system and I may be able to use .dotx after the changeover has been completed. I have custom styles in my template that set paragraph numbering, indent, etc. to make it easier for the end users to maintain the appropriate format. Three times now over the past 6 months a one of my custom styles has become corrupted on documents in the process of being created/revised. The corruption manifests as blacked out paragraph numbers, the look like they’ve been redacted. Everything in the style is set correctly and everything functions properly except you can’t see the numbers, they are simply solid black rectangles. The only way I have been able to fix the document with the corrupt style is to delete the offending style and then import a clean copy from an uncorrupted document. Has anyone experienced anything like this before, and if so, what was the source of the corruption and what was the solution to keep it from happening again? Thanks in advance for your time and assistance. Any help is greatly appreciated. ~ Phil |
#2
|
||||
|
||||
Any styles using autonumbering are prone to corruption in some way. I haven't seen an issue with blacked out numbering but have seen differences in indentation, font issues etc.
The first point of repairing a doc that goes bad is to firstly verify that the paragraph formatting has no local formatting overriding the paragraph style settings. Do this by selecting and pressing Ctrl-Space and Ctrl-Q. If the numbering is still bad, refresh the styles from the template. If the numbering is still bad, run a macro to reset the autonumbering. The macro is easily created by putting your cursor in a top level outline numbered paragraph, starting a macro recording and going to Home > Multilevel List > Define New Multilevel list. Once you dismiss this dialog you can stop recording the macro and examine what you have got. It will produce masses of code which can be cleaned up in a variety of ways but if you don't care, just stay with what it records.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
For the "blacked out numbering" issue, you can make use of a macro created by Doug Robbins (see https://answers.microsoft.com/en-us/...487724585f51):
Sub FixNumberingLevels() 'Macro created by MVP Doug Robbins For Each templ In ActiveDocument.ListTemplates For Each lev In templ.ListLevels lev.Font.Reset Next lev Next templ End Sub See http://www.gmayor.com/installing_macro.htm.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#4
|
|||
|
|||
Andrew,
Thanks! I didn't get any kind of results from Ctrl-Space/Ctrl-Q. What is that supposed to do? I did indeed find instances in the corrupt document where the user had applied other formatting, such as bold & font size changes. This created a modified version of my original style that I could see in the full style window. If this is what triggers the corruption I will have to find a way to prevent users from applying their own formatting to paragraphs set by my styles, or just live with the infrequent occurrence if that's not possible. Thanks again for the assistance. I appreciate your time. ~ Phil |
#5
|
|||
|
|||
Stefan,
Thank you for the handy macro! I do a fair amount of VBA in Excel but have very little experience using it in Word. Again, thank you for your time and assistance. ~ Phil |
#6
|
||||
|
||||
Just to be clear, did the macro fix the issue permanently (for the affected document)?
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#7
|
|||
|
|||
It appears so.
The corruption occurs so infrequently that it is hard to say for sure. The document I used it on has remained corruption free ever since, and it has been edited several times since then. Thanks again for the assistance. If the corruption ever comes back on a file I used the macro on, I will let you know. |
#8
|
||||
|
||||
Since the macro worked, the corruption was in the underlying number format (the so-called list template).
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Split paragraph into two different styles | jeffreybrown | Word VBA | 2 | 09-09-2018 09:02 PM |
How do I order the paragraph styles list? | Tunathedog | Word | 3 | 04-08-2016 05:37 AM |
Need to restore custom functions from a corrupt ".xlam" file ... | gamouning | Excel | 1 | 11-12-2015 11:03 AM |
Changing Paragraph Styles | mjawatney | Word | 6 | 04-20-2014 05:15 PM |
Multiple styles in same paragraph? | Cobb78 | Word | 1 | 05-20-2012 03:04 PM |