View Single Post
 
Old 02-15-2015, 04:49 PM
Guessed's Avatar
Guessed Guessed is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,159
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Does this work?
Code:
Dim oPara As Paragraph
Dim oRng As Range, oParaRng As Range

Set oRng = ActiveDocument.Range
oRng.Text = Replace(oRng.Text, " ", Chr(39) & ", " & Chr(39))
For Each oPara In oRng.Paragraphs
  Set oParaRng = oPara.Range
  oParaRng.MoveEnd Unit:=wdCharacter, Count:=-1
  oParaRng.Text = "('" & oParaRng.Text & "'),"
Next oPara
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote