VBA Macro Repeat Action Until End of Document
Hello,
How can I repeat the following macro in a loop with the stop condition being reaching the end of the document? I don’t master the Loop Until function well. Here is my code :
Sub NotesdeFin_MiseEnForme()
'
' NotesdeFin_MiseEnForme Macro
' Add brackets around endnote number
'
Selection.TypeText Text:="["
Selection.MoveRight Unit:=wdWord, Count:=1
Selection.TypeText Text:="]"
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.TypeText Text:=" "
Selection.MoveDown Unit:=wdParagraph, Count:=1
Loop Until
End Sub
Result, this formatting:
61. Voir note
is reformatted like this with brackets around the number :
[62]. Mozart, Briefe..., op. cit., lettre du 18 janvier 1775 : I, p. 517 (I, p. 368).
Thanks in advance for your help !
JulienDébutant