#1
|
|||
|
|||
Convert custom mark footnotes
I am editing a document in MS Word 2010 that contains over 1000 "custom mark" footnotes. I want to convert those footnotes to Word's auto footnoting. I have recorded the following macro that allows me to make the desired conversion one note at a time. I need to know how to convert the macro to run for the entire document. Any help greatly appreciated. Here is the macro I have recorded:
Sub CnvrtCstmFNs() ' ' CnvrtCstmFNs Macro ' ' Selection.Find.ClearFormatting With Selection.Find.Font .Superscript = True .Subscript = False End With With Selection.Find .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute With Selection With .FootnoteOptions .Location = wdBottomOfPage .NumberingRule = wdRestartContinuous .StartingNumber = 1 .NumberStyle = wdNoteNumberStyleArabic End With .Footnotes.Add Range:=Selection.Range, Reference:="" End With End Sub Peter961 |
#2
|
||||
|
||||
Hi Peter,
Try: Code:
Sub CnvrtCstmFNs() Dim FtNt As Footnote For Each FtNt In ActiveDocument.Footnotes With FtNt With .Reference.FootnoteOptions .Location = wdBottomOfPage .NumberingRule = wdRestartContinuous .StartingNumber = 1 .NumberStyle = wdNoteNumberStyleArabic End With .Reference.Footnotes.Add Range:=.Reference, Reference:="" End With Next End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks
Thank you, Paul Edstein,
It worked perfectly and has saved me immeasurable time. Peter961 |
#4
|
|||
|
|||
Need to do the opposite
I came across this thread because I need to do the opposite of the original poster -- I have a doc with a couple hundred numeric endnote marks and need to convert them to custom marks (round bullets).
I tried coding it, but NumberStyle doesn't have a wdNoteNumberStyleCustomMark or equivalent, so have hit a dead end? Any help would be greatly appreciated. |
#5
|
||||
|
||||
What you would need to do is to insert your round bullets before (or after) each endnote reference, then change the endnote reference Style font to hidden.
Why you'd want to actually do as you describe defies logic, IMHO, as there'd then be no way of telling which endnote reference in the document correlates with an entry in the endnotes.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Quote:
Quote:
Rather than removing the numbers entirely, I'm planning on hiding them in the text and changing them to bullets in the endnote table so eBook readers can tap on the bullet to hyperlink to the location in the text. |
#7
|
||||
|
||||
No, it wouldn't hyperlink, but IIRC, neither do footnotes & endnotes when converted to eBook formats. However, I posted a macro that has the visual effect of turning footnote & endnote references into hyperlinks, at: http://answers.microsoft.com/en-us/o...5-a1b83dae893b. The code actually supplements the footnote & endnote references (which get hidden) with hyperlinks. You could adapt that code to input some other form of reference (bullet/page #) and have the links survive the eBook conversion.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
Quote:
|
#9
|
|||
|
|||
Paul,
Back in 2012, you helped me with a similar question and I hope you can do the same with the following. I am editing a Word document using Office 2016. The document I am editing contains multiple footnotes that are not numbered seriatim and I want to change the notes so that the first note is "1", the second is "2", etc. Word's "Find" function does not recognize the existing footnotes as such, but I can find them by instructing word to find "Superscript." I want to convert the existing footnotes using Word's footnote function. Here is a macro I have recorded that enables me to replace the existing footnotes one at a time. How do I modify this to replace all the footnotes in the existing document? Selection.Find.ClearFormatting With Selection.Find.Font .Superscript = True .Subscript = False End With With Selection.Find .Text = "" .Replacement.Text = "~" .Forward = True .Wrap = wdFindAsk .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute With Selection With .FootnoteOptions .Location = wdBottomOfPage .NumberingRule = wdRestartContinuous .StartingNumber = 1 .NumberStyle = wdNoteNumberStyleArabic .LayoutColumns = 0 End With .Footnotes.Add Range:=Selection.Range, Reference:="" End With End Sub |
#10
|
||||
|
||||
I'm not sure how you could end up with footnotes that aren't numbered seriatim, since Word re-numbers them if the add/delete notes in an existing sequence. That usually reflects some form of document corruption or the presence of cross-referencing to notes that occur later in the document.
If your document contains footnotes without endnotes, you could use the macro in https://www.msofficeforums.com/word-...html#post47377 to repair a corrupt footnote numbering sequence. Simply convert the footnotes to endnotes before running the macro, then convert them back again afterwards. To ensure any endnotes & footnotes occur before their cross-references, see: https://www.msofficeforums.com/word-...html#post62674 & https://www.msofficeforums.com/word-...html#post62738 PS: When posting code, please use the code tags, indicated by the # button on the posting menu. Without them, your code loses much of whatever structure it had.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Footnotes Alignment | dddx | Word | 5 | 04-10-2017 10:36 PM |
Convert custom mark footnotes | peter961 | Word | 0 | 01-30-2012 06:40 AM |
Footnotes | Apperley | Word | 2 | 08-10-2011 03:25 PM |
Keep with next and footnotes | nfactor13 | Word | 1 | 05-15-2011 02:39 PM |
Mark citation | mavera2 | Word | 0 | 03-19-2010 05:19 AM |