View Single Post
 
Old 03-18-2022, 04:53 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,383
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Perhaps:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Rng As Word.Range, StrTxt As String, StrRef As String, StrCite As String
Set Rng = Selection.Range
With Rng
  StrTxt = Trim(.Text)
  StrRef = Trim(Split(StrTxt, """")(UBound(Split(StrTxt, """"))))
  StrCite = Trim(Left(StrTxt, Len(StrTxt) - Len(StrRef)))
  StrCite = "(" & Chr(147) & Mid(StrCite, 2, Len(StrCite) - 2) & Chr(148) & ")"
End With
Selection.Text = StrRef & "  " & StrCite
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote