#1
|
|||
|
|||
Change style when quote
Hi
I like to have text inside quotes in a different style than "normal". So far I use a macro that basically does this: Code:
Selection.Find.Replacement.Style = ActiveDocument.Styles("inQuotes") With Selection.Find .Text = "[" & ChrW(8220) & "]*[" & ChrW(8221) & "]" .Replacement.Text = "" End With But, I have to manually do it every time. I was wondering it there's a better way. A way that, after i open a quote, the style changes to "inQuotes", and after I colse a quote, the style changes back to "Normal" Any ideas? |
#2
|
||||
|
||||
I think the closest you will get is to make use of autocorrect to turn this behaviour on. I would then use a keyboard shortcut to turn it off again. I am assuming that 'inQuotes' is a character style and that your quotes are always shown inside double quotes.
In a document type a double quote, select it and apply the inQuotes character style. While it is still selected, go to File>Options>Proofing>AutoCorrect Options...>AutoCorrect. In the Replace text as you type section put "[[" in the Replace field and select the Formatted text option and click OK This will add an autocorrect function that converts [[ to a " and turns on the character style. Then as you finish your quote you can press Ctrl-Spacebar to turn off the character style again.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
Cross-posted at: Change style after pressing quote.
For cross-posting etiquette, please read: Excelguru Help Site - A message to forum cross posters
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to change and implement default theme font style change | Nikko963 | Word | 5 | 05-04-2018 09:11 AM |
Modifying horizontal rules in Intense Quote style | oakb | Word | 2 | 03-28-2017 05:02 PM |
change Bibliography style | SashikalaB | Word VBA | 1 | 02-06-2017 11:44 PM |
Change style of formulas | Jacky837 | Word | 3 | 08-08-2016 11:27 AM |
How to globally change the formatting of a bullet style to another style? | ravl13 | Word | 5 | 03-10-2013 05:04 PM |