View Single Post
 
Old 05-21-2015, 10:13 PM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If you want to mark the areas where the quoted text was with a footnote reference and use the quoted text as the reference text you cannot do this with Find and Replace. You can do it with a macro e.g. as follows http://www.gmayor.com/installing_macro.htm but the macro may have problems distinguishing between single quotes and apostrophes. See how you get on with the macro on a COPY of the document.

The macro assumes straight quotes rather than smart quotes.

Code:
Sub ReplaceWithFootnotes()
'Macro by G Mayor 22 May 2015
Dim oRng As Range
Dim strNote As String
    Set oRng = ActiveDocument.Range
    With oRng.Find
        Do While .Execute(FindText:="[!A-Za-z0-9]'[A-Za-z0-9]", _
                          MatchWildcards:=True)
            oRng.MoveEndUntil Chr(39)
            oRng.End = oRng.End + 1
            strNote = Replace(oRng.Text, Chr(39), "")
            oRng.Text = ""
            ActiveDocument.Footnotes.Add oRng, , strNote
            oRng.Collapse 0
        Loop
    End With
lbl_Exit:
    Set oRng = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote