Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Using straight, not curly, quotes automatically in a single docume
Is there any way I can turn off the 'AutoFormat as you Type' options for a
single document, not for all Word documents? I work on a lot of documents in a day, and 90% need to have typographer's quotes. 10%, however, are used to create code, so need to have straight quotes. Ideally, I would like to be able to turn off the 'AutoFormat as You Type' options specifically for the 10% of documents, without this affecting the remaining 90% of my documents. If possible, I want to avoid having to remember to set the AutoFormat options every time I open a document. (I also want to avoid using a macro if possible, as the code in the 10% is extracted to a .txt file using a macro.) I'm aware that I can turn off AutoFormat options for *all* Word documents, or press CTRL+Z when typing, or do a Find and Replace when I'm done, etc... |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Using straight, not curly, quotes automatically in a single docume
If you are extracting the text of the 10% of documents to a text file using
a macro, then the obvious solution would be to add the code to your macro to convert the smart quotes to straight quotes before saving as TXT. The original document need not be changed, nor would you need to change your default quotes preference A code for swapping the quotes would be Dim vFindText As Variant Dim vReplText As Variant Dim sFormat As Boolean Dim i As Long sFormat = Options.AutoFormatAsYouTypeReplaceQuotes 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 Options.AutoFormatAsYouTypeReplaceQuotes = sFormat http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Ms D." Ms wrote in message ... Is there any way I can turn off the 'AutoFormat as you Type' options for a single document, not for all Word documents? I work on a lot of documents in a day, and 90% need to have typographer's quotes. 10%, however, are used to create code, so need to have straight quotes. Ideally, I would like to be able to turn off the 'AutoFormat as You Type' options specifically for the 10% of documents, without this affecting the remaining 90% of my documents. If possible, I want to avoid having to remember to set the AutoFormat options every time I open a document. (I also want to avoid using a macro if possible, as the code in the 10% is extracted to a .txt file using a macro.) I'm aware that I can turn off AutoFormat options for *all* Word documents, or press CTRL+Z when typing, or do a Find and Replace when I'm done, etc... |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Using straight, not curly, quotes automatically in a single do
Thanks, that's great
"Graham Mayor" wrote: If you are extracting the text of the 10% of documents to a text file using a macro, then the obvious solution would be to add the code to your macro to convert the smart quotes to straight quotes before saving as TXT. The original document need not be changed, nor would you need to change your default quotes preference A code for swapping the quotes would be Dim vFindText As Variant Dim vReplText As Variant Dim sFormat As Boolean Dim i As Long sFormat = Options.AutoFormatAsYouTypeReplaceQuotes 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 Options.AutoFormatAsYouTypeReplaceQuotes = sFormat http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Ms D." Ms wrote in message ... Is there any way I can turn off the 'AutoFormat as you Type' options for a single document, not for all Word documents? I work on a lot of documents in a day, and 90% need to have typographer's quotes. 10%, however, are used to create code, so need to have straight quotes. Ideally, I would like to be able to turn off the 'AutoFormat as You Type' options specifically for the 10% of documents, without this affecting the remaining 90% of my documents. If possible, I want to avoid having to remember to set the AutoFormat options every time I open a document. (I also want to avoid using a macro if possible, as the code in the 10% is extracted to a .txt file using a macro.) I'm aware that I can turn off AutoFormat options for *all* Word documents, or press CTRL+Z when typing, or do a Find and Replace when I'm done, etc... . |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Using straight, not curly, quotes automatically in a single do
Thanks, that's great
"Graham Mayor" wrote: If you are extracting the text of the 10% of documents to a text file using a macro, then the obvious solution would be to add the code to your macro to convert the smart quotes to straight quotes before saving as TXT. The original document need not be changed, nor would you need to change your default quotes preference A code for swapping the quotes would be Dim vFindText As Variant Dim vReplText As Variant Dim sFormat As Boolean Dim i As Long sFormat = Options.AutoFormatAsYouTypeReplaceQuotes 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 Options.AutoFormatAsYouTypeReplaceQuotes = sFormat http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Ms D." Ms wrote in message ... Is there any way I can turn off the 'AutoFormat as you Type' options for a single document, not for all Word documents? I work on a lot of documents in a day, and 90% need to have typographer's quotes. 10%, however, are used to create code, so need to have straight quotes. Ideally, I would like to be able to turn off the 'AutoFormat as You Type' options specifically for the 10% of documents, without this affecting the remaining 90% of my documents. If possible, I want to avoid having to remember to set the AutoFormat options every time I open a document. (I also want to avoid using a macro if possible, as the code in the 10% is extracted to a .txt file using a macro.) I'm aware that I can turn off AutoFormat options for *all* Word documents, or press CTRL+Z when typing, or do a Find and Replace when I'm done, etc... . |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I search for straight quotes (") and exclude curly quotes (€œ € | Microsoft Word Help | |||
Change straight quotes to curly quotes in an existing document | Microsoft Word Help | |||
curly quotes became straight, can't get curly bakc | Microsoft Word Help | |||
Change straight quotes to curly quotes | Microsoft Word Help | |||
Can Word be set-up to change curly quotes to straight quotes when. | Microsoft Word Help |