Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 05-19-2016, 06:43 AM
mdhg mdhg is offline Word macro for selecting text and putting it in footnotes Windows 10 Word macro for selecting text and putting it in footnotes Office 2013
Novice
Word macro for selecting text and putting it in footnotes
 
Join Date: Feb 2016
Posts: 10
mdhg is on a distinguished road
Default

Thank you very much Graham Mayor!

The thing is that the double-square-bracket-notes have long been transformed into (static) footnotes and I have been editing the file a lot.
But the code will certainly be of great value next time I have to convert from Latex to Word (although currently I don't feel like doing this anytime soon).
And it will for sure help a lot of people facing similar problems.

Meanwhile Stefan Bloom provided a macro that turns the static footnotes into regular dynamic ones:

Quote:
Originally Posted by Stefan Blom View Post
The following macro should do the job. It is best to try it on a copy of the original document first:

Code:
Sub ConvertCustomFootnotesToAutoFootnotes()
'Macro created by Stefan Blom, MVP, May 2016
Dim ftText As String
Dim r As Range
Dim ftCount As Long
Dim i As Long
ftCount = ActiveDocument.Footnotes.Count
For i = ftCount To 1 Step -1
ftText = ActiveDocument.Footnotes(i).Range.Text
Set r = ActiveDocument.Footnotes(i).Reference.Duplicate
ActiveDocument.Footnotes(i).Delete
ActiveDocument.Footnotes.Add Range:=r, Text:=ftText
Next i
End Sub

https://www.msofficeforums.com/word/...te-levels.html

Thank you very much for your help. I really do appreciate it.
Reply With Quote
 

Tags
footnotes, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word macro for selecting text and putting it in footnotes Word 2013 does not search text in footnotes unless I first click in a footnote amz Word 1 11-18-2015 01:56 PM
Word macro for selecting text and putting it in footnotes word 2007 - footnotes and text box glggluig Word 1 08-10-2014 04:09 AM
Putting text in color shapes dianabanana Word 1 04-07-2014 08:07 PM
Word macro for selecting text and putting it in footnotes Putting text to Excel Leandro Office 2 03-01-2012 11:51 PM
Selecting the macro document lars Word VBA 0 08-19-2010 06:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:28 PM.


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