Hi Macropod, many thanks for updating this code for me, very much appreciated. There appears to be 2 message boxes that come up and it won't let me run the macro - MsgBox Chr(34) & .Text & Char(34), how can I amend these so I don't get the message box. Thanks.
Image.JPG
Code:
'Remove punctuation and insert semi-colon at end of sentence
.Find.Text = "[! ^13]@[!.\!\?:;]^13"
Do While .Find.Execute = True
With .Duplicate
MsgBox Chr(34) & .Text & Chr(34)
Select Case Trim(.Words.First)
Case "and", "but", "or", "then"
'do nothing
Case Else
.Words.First.InsertAfter ";"
End Select
End With
.Collapse wdCollapseEnd
Loop
End With
'Remove placeholder.
.Paragraphs(1).Range.Delete
With .Range
'Prefix designated bold first words with a tab
.Find.Text = "^13[A-Za-z]"
Do While .Find.Execute = True
MsgBox Chr(34) & .Text & Chr(34)
With .Duplicate.Paragraphs.Last.Range
If .Style = "Normal" Then
If .Characters.First.Font.Bold = False Then .InsertBefore vbTab
End If
End With
.Collapse wdCollapseEnd
Loop
End With