View Single Post
 
Old 09-16-2023, 11:58 PM
RobiNew RobiNew is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Sep 2023
Posts: 200
RobiNew is on a distinguished road
Default

I have copied and used with success this code by macropod:
Application.ScreenUpdating = False
Dim FtNt As Footnote
Dim Rng As Range
'Dim Fld As Field
With ActiveDocument
For Each FtNt In .Footnotes
Set Rng = FtNt.Reference
With Rng
'Delete spaces etc.
Do While .Characters.First.Previous Like "[ " & Chr(160) & "]"
.Characters.First.Previous.Text = vbNullString
Loop
'Invert ref. number and punctuation
'MsgBox .Characters.First.Previous
Do While Not .Characters.First.Previous Like "[0-9A-Za-z]" And Not .Characters.First.Previous Like "‹" And Not .Characters.First.Previous Like "«"
.InsertAfter .Characters.First.Previous
.Characters.First.Previous.Delete
Loop
End With
Next
End With
Thanks a lot for this!
My problem is that I want the inversion to occur only in paragraphs with no left indent. How to I modify the code so that left-indented paragraphs are skipped? Thank you for your time!
Reply With Quote