Converting in-text citations to footnotes/endnotes

Technical Support also has some tools to convert in-text citations to footnotes and footnotes to in-text citations. If you contact Technical Support, we can assist with these conversions:

http://www.endnote.com/support/entechform.asp

Jason Berman
Technical Sup Rep RS

Thomson Reuters

Phone: +1 800-336-4474
thomsonreuters.com

Thank you Miriam for your post. Yes, the macro does work.

I am not a techie, but I do pay attention to directions in a very detailed manner.  I usually do not give comments online, but I thought I needed to do this because Miriam just saved me a lot of headache and time trying to convert my dissertation manuscript from a format in which I used EndNote X6 to create (with JAMA style), to one which my professor prefers (he prefers the one where you have consecutively numbered citations with MS Word footnotes inserted below each page).

Typically, inserting footnotes (using Word footnote features and citations inserted with EndNote software) is an easy task if you start this process from the beginning. It becomes difficult when you want to convert your document (which could run into hundreds of pages) containing citations and references (initially created using only the EndNote software) back into a document with footnotes and bibliography (that is arranged in alphabetical order).

I found that the macro may not work if you have page breaks and section breaks within your doument and you run the macro without first modifying it like Miriam suggested (i.e., deleting lines 3-6, second to the last line, and replacing line 7 with the suggested code line). However, if you modify the macro, you do not have to remove your already formatted document before running the macro. Also, remember to grant access to the macro by changing the security settings (for Word 2010, the navigation is file>options>trust center>trust center settings>macro settings>enable all macros) (remeber to change this back to the original setting once you’ve successfully run the macro).

The following directions below was exactly what I followed in order to format from Endnote JAMA (without Word footnote) to Chicago 16th A style with Word footnote.

  1. Follow the direction given by Miriam in copying the macro below into Word

  2. run macro

  3. Go to the end of your document. You will find citations having only roman numerals (this was created by the macro) and the original references from your document.

  4. Change the citations having only Roman numerals (i.e., i, ii, iii, iv, etc) into Word endnote (i.e., those containing both the Roman numerals and word-form citations following the roman numerals, by changing the style within the Word document to ‘Chicago 16th A’ (meanwhile, I reformatted the Chicago 16th A style to look like JAMA style within the edit section of EndNote X6).

  5. select (4)(i.e., select all the Word endnotes)

  6. right click on (5) to change the format before converting the Word endnotes to footnotes. Paragraph: align left, body text, indentation: left 0, right 0, special none; Spacing: before 0, after 10pt, line spacing multiple, at 1.15.  

  7. select  (6)

  8. right click (7) and select convert to change the endnotes to footnotes (You will now have a document that have the in-text citations as footnotes on each page. Towards the end of your document, you will have the bibliography arranged alphabetically and references numbered consecutively).

I hope this helps others in my shoe trying to change the formatting of their document.

Sub intext2footnote()
Dim vLastSectionI, vField, i, J
For Each vField In ActiveDocument.Fields
Selection.GoTo What:=wdGoToField, Which:=wdGoToNext, Count:=1, Name:= _
“ADDIN”
Selection.Find.ClearFormatting
With Selection.Find
.Text = “{ }”
.Replacement.Text = “”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Cut
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:=“temp”
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
ActiveDocument.Endnotes.Add Range:=Selection.Range, Reference:=""
Selection.Paste
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=“1”
Selection.Find.ClearFormatting
With Selection.Find
.Text = “{ }”
.Replacement.Text = “”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.GoTo What:=wdGoToBookmark, Name:=“temp”
Selection.Find.ClearFormatting
With Selection.Find
.Text = “{ }”
.Replacement.Text = “”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.ClearFormatting
With Selection.Find
.Text = “{ }”
.Replacement.Text = “”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
ActiveDocument.Bookmarks(“temp”).Delete
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Next vField
End Sub

Hi all …

I needed to convert in-text refs like (Jones 2010:23) or (Peters 2011:19-23) to footnote refs of the format

…, p. 23.

…, pp. 19-23.

and if the in-text citation does not show the author, then switch author on in the footnote

This macro is a modification of the one posted by Miriam way back in 2009 from one created by Shyam Ranganathan.

I have removed redundant code (which you get when you record a macro), and added comments so those not too familiar with VBA can see what’s happening.

You can un-comment the message boxes (just delete ’ in 'MsgBox …) to see what’s happening.

The code could be improved further, but it works OK … at least for me (Word 2007, Windows 7).

Happy conversions!!!

PS: To make this work for Endnotes just change ActiveDocument.Footnotes.Add to ActiveDocument.Endnotes.Add


Public Sub ConvertIntextToFootnote()

Dim oField As Field
Dim sCode As String
Dim sSuffix As String
Dim sSuffixLeft As String
Dim sSuffixRight As String
Dim pos1 As Long
Dim pos2 As Long

'Loop through all fields in the document

For Each oField In ActiveDocument.Fields

    'Is the field an Endnote field?
    
    If InStr(oField.Code.Text, “EN.CITE”) = 0 Then GoTo Bypass:
    
    oField.Select
    
    'Modify the Suffix in the field code … <Suffix>text</Suffix>, if one exists

    sCode = oField.Code.Text
    'MsgBox sCode
    pos1 = InStr(sCode, “<Suffix>”)
    
    If pos1 > 0 Then 'suffix exists, so extract it
    
        sSuffixLeft = Left(sCode, pos1 + 7)
        'MsgBox sSuffixLeft
        pos2 = InStr(sCode, “</Suffix>”)
        sSuffixRight = Right(sCode, Len(sCode) - pos2 + 1)
        'MsgBox sSuffixRight
        sSuffix = Mid(sCode, pos1 + 8, pos2 - (pos1 + 8))
        'MsgBox sSuffix
        
        'If no dash, replace : with p. else with  pp.

        If InStr(sSuffix, “-”) > 0 Then
            sSuffix = Replace(sSuffix, “:”, " pp. ")
        Else
            sSuffix = Replace(sSuffix, “:”, " p. ")
        End If
        
        'Add a full stop

        sSuffix = sSuffix + “.”
        'MsgBox sSuffix
        
        'Now rebuild the code

        sCode = sSuffixLeft + sSuffix + sSuffixRight

        'Set the new code in the field

        oField.Code.Text = sCode
        'MsgBox oField.Code.Text
        
    End If
    
     'If author is excluded, show the author
        
        If InStr(sCode, “ExcludeAuth=”“1"”") > 0 Then
        
            oField.Code.Text = Replace(sCode, “ExcludeAuth=”“1"”", “”)
            
        End If
    
    Selection.Cut
    
    'Add temporary bookmark so we can return to the Main Story

    With ActiveDocument.Bookmarks
        .Add Range:=Selection.Range, Name:=“tempqxtz”
        .DefaultSorting = wdSortByName
        .ShowHidden = False
    End With
            
    'Add the Footnote

    ActiveDocument.Footnotes.Add Range:=Selection.Range, Reference:=""
    Selection.Paste
    
    'Return to Main Story

    Selection.GoTo What:=wdGoToBookmark, Name:=“tempqxtz”
    
    'Delete the temporary bookmark

    ActiveDocument.Bookmarks(“tempqxtz”).Delete

Bypass:
    
Next oField

MsgBox “Process Complete”, vbOKOnly + vbInformation, “Convert In-text Citations to Footnotes”

End Sub


1 Like

Dear Miriam,

I have a phd thesis which I have to organize according to author-date style. My references are improperly cited and are in different styles, so I just downloaded the Endnote trial version to help me organize references and bibliography. This is my first encounter with this program and I am having some difficulties.

So I have a cople of quesitons:

  1. I need to transfer each reference manually from my thesis in Word, into Endnote, is that right?

  2. My references are not properly written, so I thought that inserting them into Endnote and indicating the style I need, the program would automatically correct the references, or do I have to break down each reference myself and put each part of the reference in appropriate window? i.e. author in the author window, year in the year window,etc. This would require huge work ! I thought that Endnote did this, maybe I didn’t understand, could you please help me figure out how to do that? 

Thanks in advance

duplicate post here

http://community.thomsonreuters.com/t5/EndNote-General/Using-Endnote-for-the-first-time/m-p/126250#M23517

here is  free movie sites  to watch you favorite movies online.

I commend your hard work on this and thank you for this information. You’ve got what it takes to get attention