Straight Quotes to Curley Quotes

M

Michael Koerner

I can change "Text" to "Text" everywhere in my document with the exception of the header and footer. Using Word 2007(SP1) under XP (SP3). Any thoughts?
 
M

Michael Koerner

I did find a PITA work around by typing the quoted text in the main body of the page, then doing a copy and paste into the header.

--

Regards
Michael Koerner


I can change "Text" to "Text" everywhere in my document with the exception of the header and footer. Using Word 2007(SP1) under XP (SP3). Any thoughts?
 
S

Stefan Blom

Is the correct language applied to the text in headers and footers?

--
Stefan Blom
Microsoft Word MVP


I can change "Text" to "Text" everywhere in my document with the exception
of the header and footer. Using Word 2007(SP1) under XP (SP3). Any thoughts?
 
M

Michael Koerner

I didn't know you could change languages through out a document. AFAIK it is all one language. How can I tell?

--

Regards
Michael Koerner


Is the correct language applied to the text in headers and footers?

--
Stefan Blom
Microsoft Word MVP


I can change "Text" to "Text" everywhere in my document with the exception
of the header and footer. Using Word 2007(SP1) under XP (SP3). Any thoughts?
 
S

Stefan Blom

First place the insertion point in a header paragraph, and then look in the
Language dialog box (Review tab | Set Language).

The reason for my question is that "smart quotes" in Word are
language-specific, adjusting to the language at the insertion point.

--
Stefan Blom
Microsoft Word MVP


I didn't know you could change languages through out a document. AFAIK it is
all one language. How can I tell?

--

Regards
Michael Koerner


Is the correct language applied to the text in headers and footers?

--
Stefan Blom
Microsoft Word MVP


I can change "Text" to "Text" everywhere in my document with the exception
of the header and footer. Using Word 2007(SP1) under XP (SP3). Any
thoughts?
 
M

Michael Koerner

Stefan;

Thanks very much, will check it out.

--

Regards
Michael Koerner


First place the insertion point in a header paragraph, and then look in the
Language dialog box (Review tab | Set Language).

The reason for my question is that "smart quotes" in Word are
language-specific, adjusting to the language at the insertion point.

--
Stefan Blom
Microsoft Word MVP


I didn't know you could change languages through out a document. AFAIK it is
all one language. How can I tell?

--

Regards
Michael Koerner


Is the correct language applied to the text in headers and footers?

--
Stefan Blom
Microsoft Word MVP


I can change "Text" to "Text" everywhere in my document with the exception
of the header and footer. Using Word 2007(SP1) under XP (SP3). Any
thoughts?
 
G

Graham Mayor

While typing in the header/footer will activate autoformat as you type. The
Autoformat command does not act on the header/footer view. You are therefore
going to have to use a bit of a lash-up with replace in order to replace the
straight quotes in the header/footer. The following macro should do the
trick. If there are any examples that it misses, you will have to create the
wildcard strings that ensure they are fixed. Here the body of the document
is formatted using autoformat and the header/footer with replace


Dim vFindText As Variant
Sub FixQuotes()
Dim vReplText As Variant
Dim oStory As Range
Dim i As Long

Options.AutoFormatReplaceQuotes = True
Selection.Document.Kind = wdDocumentNotSpecified
Selection.Range.AutoFormat

vFindText = Array("^034[ ^13]", "^034", "^039[ ^13]", "^039")
vReplText = Array("^0147 ", Chr(148), "^0145 ", Chr(146))
For Each oStory In ActiveDocument.StoryRanges
With oStory.Find
.Forward = True
.Wrap = wdFindContinue
.MatchWholeWord = True
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
.Format = True
For i = LBound(vFindText) To UBound(vFindText)
.Text = vFindText(i)
.Replacement.Text = vReplText(i)
.Execute Replace:=wdReplaceAll
Next i
End With
Next oStory
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Thanks very much, will check it out.

Regards
Michael Koerner

First place the insertion point in a header paragraph, and then look in the
Language dialog box (Review tab | Set Language).
The reason for my question is that "smart quotes" in Word are
language-specific, adjusting to the language at the insertion point.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top