Thanks, Helmut. I'll try that. I'll have to study Graham's solution too. Maybe it's a font problem rather than a character problem, since the right characters are already in the text, according to Graham. Someone edited my text and changed the font to Courier New. When I change it back to Times New Roman, my curly quotes seem to have disappeared.
Cheers,
S.
> Hi Shirley,
>
[quoted text clipped - 26 lines]
>
> Vista Small Business, Office XP
Shauna Kelly - 13 Jan 2008 13:12 GMT
Hi Shirley
If that's all the problem is, then use Format > AutoFormat. If you need
to do it in VBA, use something like this:
Sub MakeQuotesCurly()
Dim oDoc As Word.Document
Dim bOldAutoFormatQuotes As Boolean
Set oDoc = ActiveDocument
'Store the user's old settings
bOldAutoFormatQuotes =
Word.Application.Options.AutoFormatReplaceQuotes
'Set up Word to AutoFormat what we want
Word.Application.Options.AutoFormatReplaceQuotes = True
'Try Word's built-in autoformatting
On Error Resume Next
oDoc.Range.AutoFormat
'If Word's Autoformat didn't work, tell the user
If Err.Number > 0 Then
MsgBox "Error: Could not change straight quotes to curly quotes"
End If
'Restore the user's old settings
Word.Application.Options.AutoFormatReplaceQuotes =
bOldAutoFormatQuotes
End Sub
Note that AutoFormat won't work in footnotes.
If it helps, my standard test sentence for such things is:
Fred Smith, who was staying at his sister's home in 's Gravenhage, said
"I'll meet you at 8 o'clock 'n' we'll have dinner at "George's". I'll
ask the maître d' to recommend a wine."
Hope this helps.
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
> Thanks, Helmut. I'll try that. I'll have to study Graham's solution
> too. Maybe it's a font problem rather than a character problem, since
[quoted text clipped - 36 lines]
>>
>> Vista Small Business, Office XP
Graham Mayor - 13 Jan 2008 15:19 GMT
You can check the ANSI code of an inserted character with the following
macro
Sub ANSIValue()
S1$ = "Because the selected text contains"
S2$ = " characters, not all of the ANSI values will be displayed."
S3$ = "ANSI Value ("
S4$ = " characters in selection)"
S5$ = " character in selection)"
S6$ = "Text must be selected before this macro is run."
S7$ = "ANSI Value"
Dim strSel, strNums, LastFourChar As String
Dim iPos As Integer
strSel = Selection.Text
If Len(strSel) > 0 Then
For i = 1 To Len(strSel)
strNums = strNums + str(Asc(Mid(strSel, i)))
Next i
strNums = LTrim(strNums)
If Len(strNums) > 255 Then
LastFourChar = Mid(strNums, 252, 4)
strNums = Left(strNums, 251) + Left(LastFourChar, 4 - InStr(" ",
LastFourChar))
MsgBox S1$ + str(Len(strSel)) + S2$
End If
If Len(strSel) = 1 Then S4$ = S5$
MsgBox strNums, 0, S3$ + LTrim(str(Len(strSel))) + S4$
Else
MsgBox S6$, 0, S7$
End If
End Sub
The smart quote characters are present in both Times New Roman and Courier
New (though obviously have a different appearance from one another). One
ploy may be to run the macro I posted earlier to change them all to straight
quotes then run autoformat with the straight quotes to smart quotes option
set.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Thanks, Helmut. I'll try that. I'll have to study Graham's solution
> too. Maybe it's a font problem rather than a character problem, since
[quoted text clipped - 35 lines]
>>
>> Vista Small Business, Office XP