Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-01-2012, 09:37 AM
peter961 peter961 is offline Convert custom mark footnotes Windows 7 64bit Convert custom mark footnotes Office 2010 64bit
Novice
Convert custom mark footnotes
 
Join Date: Jan 2012
Posts: 5
peter961 is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 02-03-2012, 02:31 PM
macropod's Avatar
macropod macropod is offline Convert custom mark footnotes Windows 7 64bit Convert custom mark footnotes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 02-03-2012, 03:39 PM
peter961 peter961 is offline Convert custom mark footnotes Windows 7 64bit Convert custom mark footnotes Office 2010 64bit
Novice
Convert custom mark footnotes
 
Join Date: Jan 2012
Posts: 5
peter961 is on a distinguished road
Default Thanks

Thank you, Paul Edstein,

It worked perfectly and has saved me immeasurable time.

Peter961
Reply With Quote
  #4  
Old 01-26-2016, 01:19 PM
buttonsrtoys buttonsrtoys is offline Convert custom mark footnotes Windows 7 64bit Convert custom mark footnotes Office 2010 64bit
Novice
 
Join Date: Jan 2016
Posts: 5
buttonsrtoys is on a distinguished road
Default 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.
Reply With Quote
  #5  
Old 01-26-2016, 03:04 PM
macropod's Avatar
macropod macropod is offline Convert custom mark footnotes Windows 7 64bit Convert custom mark footnotes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #6  
Old 01-26-2016, 03:27 PM
buttonsrtoys buttonsrtoys is offline Convert custom mark footnotes Windows 7 64bit Convert custom mark footnotes Office 2010 64bit
Novice
 
Join Date: Jan 2016
Posts: 5
buttonsrtoys is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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.
Thanks for the thoughts. Unless I'm missing something, though, that approach wouldn't hyperlink the bullet back to the cited text.
Quote:
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.
I'm doing this because nonfiction books often forgo the endnote mark entirely and just put the page number as a heading above the endnote (e.g., Malcolm Gladwell does his endnotes this way). So, there are no superscripts in the text, but if you read something and want to see its source, you look it up by page number in the notes.

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.
Reply With Quote
  #7  
Old 01-26-2016, 03:48 PM
macropod's Avatar
macropod macropod is offline Convert custom mark footnotes Windows 7 64bit Convert custom mark footnotes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #8  
Old 01-26-2016, 05:02 PM
buttonsrtoys buttonsrtoys is offline Convert custom mark footnotes Windows 7 64bit Convert custom mark footnotes Office 2010 64bit
Novice
 
Join Date: Jan 2016
Posts: 5
buttonsrtoys is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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.
Thanks Macropod! Gee, you're right about endnote marks not hyperlinking the way the TOC does. I had been assuming this was a built-in feature but did a test by saving as a PDF and only the TOC linked. Looking forward to using your macro. Thanks again!
Reply With Quote
  #9  
Old 09-04-2017, 08:42 AM
peter961 peter961 is offline Convert custom mark footnotes Windows 10 Convert custom mark footnotes Office 2016
Novice
Convert custom mark footnotes
 
Join Date: Jan 2012
Posts: 5
peter961 is on a distinguished road
Default

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
Reply With Quote
  #10  
Old 09-04-2017, 02:49 PM
macropod's Avatar
macropod macropod is offline Convert custom mark footnotes Windows 7 64bit Convert custom mark footnotes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert custom mark footnotes Footnotes Alignment dddx Word 5 04-10-2017 10:36 PM
Convert custom mark footnotes peter961 Word 0 01-30-2012 06:40 AM
Convert custom mark footnotes Footnotes Apperley Word 2 08-10-2011 03:25 PM
Convert custom mark footnotes 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

Other Forums: Access Forums

All times are GMT -7. The time now is 07:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft