0

I turned my comments into footnotes using the following macro by tohuwawohu (very helpful one thanks man) but because of how I had my comments placed it turned out that most of footnote references (the numbers in text 1,2 etc) where in awkward places in the middle of sentence.

Is there a macro or some other way I can move it at the end of sentence/paragraph?

Link and macro:

(How can I automatically convert all comments in a word 2010 document to footnotes?)

Sub comment2footnote()
  Application.ScreenUpdating = False
  Dim oDoc As Document, oComment As Comment
  Set oDoc = ActiveDocument
  For Each oComment In ActiveDocument.Comments
      oDoc.Footnotes.Add Range:=oComment.Scope, Text:=oComment.Range.Text
      oComment.Delete
  Next
  Application.ScreenUpdating = True
End Sub
DavidPostill
  • 162,382

1 Answers1

0

(assuming for this example that comment is within single paragraph/sentence) Edit the Range in the first line of code in your For loop.

To put at end of paragraph that the comment is in:

oDoc.Footnotes.Add Range:=oComment.Scope.Paragraphs(1).Range, Text:=oComment.Range.Text

To put at end of sentence - if you use 2 spaces after full stop, then this will leave a space between the full stop and the footnote reference. You could add a second .Previous at end (ie .Last.Previous.Previous) but then if your sentence is at the end of a paragraph, moving back 2 characters may put the footnote before the full stop:

  oDoc.Footnotes.Add Range:=oComment.Scope.Sentences(1).Characters.Last.Previous, Text:=oComment.Range.Text
Tanya
  • 1,783
  • 1
  • 11
  • 6