using SmartQuotes in a REF field

  • Thread starter Thread starter ceallagh
  • Start date Start date
C

ceallagh

When I type something into my ASK prompt that has an apostrophe, the document
records it as a straight quote instead of a curly quote and returns a
straight quote into the REF field. How can I make it be curly? AutoFormat
is on.
 
ASK fields do not support autoformat as you type and the REF field will
insert the content of the ASK bookmark. The only practical solution is to
force an autoformat e.g. using a macro

Options.AutoFormatReplaceQuotes = True
Selection.Range.AutoFormat

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Thank you. To verify: I would answer all the prompts, then run the macro?
I like the idea of this macro for several reasons... is there a way to make
it run every time a document is printed? We often get docs that have a
combination of straight and smart quotes, which looks unprofessional.
 
Yes update at the end
You could intercept the print or save commands in the document template to
add the code
eg

Sub FileSave()
Options.AutoFormatReplaceQuotes = True
Selection.Range.AutoFormat
On Error Resume Next
ActiveDocument.Save
End Sub

http://www.gmayor.com/installing_macro.htm
 
That works brilliantly! Thank you.

Graham Mayor said:
Yes update at the end
You could intercept the print or save commands in the document template to
add the code
eg

Sub FileSave()
Options.AutoFormatReplaceQuotes = True
Selection.Range.AutoFormat
On Error Resume Next
ActiveDocument.Save
End Sub

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


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

My web site www.gmayor.com
 
You are welcome :)

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

My web site www.gmayor.com

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

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

Back
Top