Hi Pasquale,
I think the way I outlined is as good as any - here's some code which should do it:
[VBA]
Selection.HomeKey wdStory
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Text = "' "
.Replacement.Text = "?"
.Execute Replace:=wdReplaceAll
.Text = "(\{[!\}?]{1,})?([!\{\}]{1,}\})"
.Replacement.Text = "\1'\2"
While .Execute(Replace:=wdReplaceAll): Wend
.Text = "?"
.Replacement.Text = "' "
.Execute Replace:=wdReplaceAll
End With
[/VBA]
In the unlikely event of you having any ? characters in your document already, then replace it with some other character (which isn't in your document) everywhere it's used (three places).