Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
Disable Typesetting Quotes in a Template
Is there any way to disable typesetting quotes in a template rather
than globally? I have some templates where I would like there to only be straight quotes and others templates where I'd like typesetting quotes. |
#2
Posted to microsoft.public.word.newusers
|
|||
|
|||
Disable Typesetting Quotes in a Template
You could use a macro to toggle between straight quotes and smart quotes,
though the macro cannot account for missing quotes when straight quotes are converted to smart quotes and may thus produce incorrect results. http://www.gmayor.com/installing_macro.htm Sub ReplaceQuotes() Dim vFindText As Variant Dim vReplText As Variant Dim sFormat As Boolean Dim sQuotes As String Dim i As Long sQuotes = MsgBox("Click 'Yes' to convert smart quotes to straight quotes." & vbCr & _ "Click 'No' to convert straight quotes to smart quotes.", _ vbYesNo, "Convert quotes") sFormat = Options.AutoFormatAsYouTypeReplaceQuotes If sQuotes = vbYes Then vFindText = Array(Chr(147), Chr(148), Chr(145), Chr(146)) vReplText = Array(Chr(34), Chr(34), Chr(39), Chr(39)) Options.AutoFormatAsYouTypeReplaceQuotes = False Selection.HomeKey wdStory With Selection.Find .Forward = True .Wrap = wdFindContinue .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Format = True .MatchCase = True For i = LBound(vFindText) To UBound(vFindText) .Text = vFindText(i) .Replacement.Text = vReplText(i) .Execute Replace:=wdReplaceAll Next i End With Else Options.AutoFormatReplaceQuotes = True Selection.Range.AutoFormat End If Options.AutoFormatAsYouTypeReplaceQuotes = sFormat End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org wrote in message ... Is there any way to disable typesetting quotes in a template rather than globally? I have some templates where I would like there to only be straight quotes and others templates where I'd like typesetting quotes. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change straight quotes to curly quotes in an existing document | Microsoft Word Help | |||
how do i do typesetting word 2003? | Page Layout | |||
TEMPLATE FOR FAMOUS QUOTES | Microsoft Word Help | |||
Script to change Smart quotes to straight quotes for all users? | Microsoft Word Help | |||
Template for quotes | Microsoft Word Help |