#1
|
|||
|
|||
Corrupted footnotes in Word
Hi I have a fairly large (~64 pg) word document. I'm not sure what caused it, but the endnotes have recently become unreadable. The usual superscripted numbers have been replaced with right angle upside down "L" shapes, both in the text and in the endnotes. I've taken a screenshot so you can see an example here: http://i.imgur.com/X2bGm.png I have Word 2010. I tried clickong on Refernces->Footnotes->Number Format-> 1,2,3 .. and applying changes to the whole document without any luck. Does anyone have any other ideas? I'd very much appreciate your help. Thank you! |
#2
|
||||
|
||||
Without seeing the actual document, it's hard to diagnose. However, it looks like someone has copied content that included fields and converted them to plain text, perhaps via a macro (the !! is what you'd get by converting a field's opening brace (ie '{') to text).
Can you attach a document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you -- sample attached
Thank you for your help! I really appreciate it.
I have attached a sample. Please let me know if it has what you need, or if another sample would help If what you suspect is true, is there an easy way to reverse it? That is, convert it back to fields? |
#4
|
||||
|
||||
Your attachment doesn't contain enough material for a diagnosis or the suggestion of a solution. Not only does it lack any of the body content to which the 'footnotes' relate, even they appear to have been edited - the characters appearent in your first post's attacment are no longer present. So, if you can post some more substantial content, we may be able to make some progress.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
||||
|
||||
Cross-posted at: http://answers.microsoft.com/en-us/o...5-c2c4127ddb07
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Updated debug sample
Thank you again for your help, and I apologize for not including enough material in the first sample. I have attached another sample, which hopefully has enough information. As I'm looking at it on the screen now, it shows the same behavior as described in my original post. Please let me know if you need anything else
|
#7
|
||||
|
||||
Hi mythander889,
I've put together a macro for repairing footnote and endnote references (your attachment actually has endnotes, not footnotes) but, before you run it, I think you might have some other work to do. In developing the code, I noticed that one of the references kept duplicating lines on screen. This could be a sign of document corruption. Accordingly, I recommend that you: • insert a paragraph break at the very end of the body of the document (not in the endnotes); • copy & paste everything except the new paragraph break into a new document; • close the old document and save the new one over it. That is generally sufficient to fix document corruption. You can then run the following macro. Code:
Sub FixNoteRefs() ' Turn Off Screen Updating Application.ScreenUpdating = False Dim i As Long, RngRef As Range, StrLnk As String With ActiveDocument ' Process all Footnotes For i = .Footnotes.Count To 1 Step -1 Set RngRef = .Footnotes(i).Reference With .Footnotes(i) .Range.Cut .Delete End With ActiveDocument.Footnotes.Add Range:=RngRef .Footnotes(i).Range.Paste Next ' Process all Endnotes For i = .Endnotes.Count To 1 Step -1 Set RngRef = .Endnotes(i).Reference With .Endnotes(i) .Range.Cut .Delete End With ActiveDocument.Endnotes.Add Range:=RngRef .Endnotes(i).Range.Paste Next End With ' Cleanup Set RngRef = Nothing ' Restore Screen Updating Application.ScreenUpdating = True End Sub The next issue to consider is whether the odd characters that show in the attachment to your first post are still in the document. They're not in your latest attachment and the process for repairing the hyperlinks, especially, is affected by whether those characters are still present. If you could clarify that point, we can make more progress there too. If those characters are no longer present, does the word 'Accessed' always appear after the hyperlink?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
Works!
Thank you so much! I installed and ran the macro, which fixed the footnotes beautifully. They now appear with numbers, instead of as boxes, exactly as expected. I am very very appreciative
I'm still seeing some weird behavior. I notice it in two places. I'll copy how it appears in plain text here, and try to upload an attachment that shows the behavior and screen shot as well. The first weird behavior occurs around comments. There's an extra "|" added after each comment, as in the following example. The comment ends after "was" it as if the country was | gathered in http://imgur.com/VjftV Note the |, both in the comment on the right and on the last line on the far left The second occurs with hyperlinks. The word HYPERLINK appears, preafaced by a double !!, and a \o. . In a now-famous address, the former Chairman of the HYPERLINK "http://en.wikipedia.org/wiki/Federal_Communications_Commission" \o "Federal Communications Commission" Federal Communications Commission complained that if http://imgur.com/YeVUt I have attached a doc with examples of both. Please let me know if you need any other info |
#9
|
||||
|
||||
Hi mythander889,
Did you deal with the potential corruption issues as per my previous post? I'd have thought that would take care of the comment problems too, though you hadn't mentioned them previously. FWIW, there are no comments in your latest attachment. As for the Hyperlinks, you haven't answered my questions. The preceding !! character (actually ASCII 19) and trailing ¶ character (actually ASCII 20) represent the locations of the original opening and closing field braces. As before, your latest attachment doesn't evidence either of those characters. The \o is an internal field switch for the field's display text.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
I apologize for the upload -- that's very very strange. When I saved it, it had both a comment and '!!' and ¶ characters. After opening it again, the characters appear to have disappeared. It now appears as in the Hyperlink example, with the word HYPERLINK preceding the link. Do you know of a way to fix this?
In the original document (before running the above script), when I select the HYPERLINK and following text, then hit ctrl+shift+F9, the text returns to normal. In the new document (after running the script), this isn't the case. Instead, nothing happens after ctrl+shift+F9 I did do the corruption fix as you suggested. Thank you! Last edited by mythander889; 09-11-2012 at 02:53 PM. Reason: Left part out |
#11
|
||||
|
||||
To fix the hyperlinks, try the following macro:
Code:
Sub FixNoteLinks() ' Turn Off Screen Updating Application.ScreenUpdating = False Dim i As Long With ActiveDocument ' Process all Footnotes For i = .Footnotes.Count To 1 Step -1 Call FixLinks(.Footnotes(i).Range) Next ' Process all Endnotes For i = .Endnotes.Count To 1 Step -1 Call FixLinks(.Endnotes(i).Range) Next End With ' Restore Screen Updating Application.ScreenUpdating = True End Sub Sub FixLinks(Rng As Range) Dim RngRef As Range, StrLnk As String, StrDisp As String If Rng.Hyperlinks.Count = 0 Then Set RngRef = Rng.Duplicate With RngRef.Find .ClearFormatting .Replacement.ClearFormatting .Replacement.Text = "" .Format = True .Font.ColorIndex = wdBlue .Font.Underline = wdUnderlineSingle .Execute If .Found Then StrDisp = RngRef.Duplicate.Text RngRef.Duplicate.Text = vbNullString End If End With Set RngRef = Rng.Duplicate With RngRef If InStr(.Text, Chr(19)) And InStr(RngRef.Text, Chr(20)) Then .Start = .Start + InStr(.Text, Chr(19)) - 1 .End = .Start + InStr(.Text, Chr(20)) .Characters.First.Delete .Characters.Last.Delete StrLnk = Trim(.Text) Rng.Fields.Add Range:=RngRef, Text:=StrLnk, Preserveformatting:=False Rng.Hyperlinks(1).TextToDisplay = StrDisp End If End With End If ' Cleanup Set RngRef = Nothing End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#12
|
|||
|
|||
That worked perfectly! All the problems are fixed. Is there a way I can thank you?
|
#13
|
||||
|
||||
Your thanks is enough. Enjoy.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
footnotes, word 2010 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word footnotes and track changes problem | Carnegie | Word | 14 | 03-13-2017 01:31 AM |
Word doc corrupted and seems lost | wsm2 | Word | 0 | 01-30-2012 02:07 PM |
Corrupted Word Doc? Please help! | Marienna | Word | 5 | 01-28-2012 03:02 AM |
Possible corrupted Word 2003 document | Squidd | Word | 2 | 05-24-2011 04:43 AM |
Corrupted word file? | Konsolidering | Word | 0 | 02-21-2011 11:17 PM |