Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-10-2019, 07:44 AM
perezbalen perezbalen is offline Change style when quote Windows 10 Change style when quote Office 2019
Novice
Change style when quote
 
Join Date: Dec 2019
Posts: 1
perezbalen is on a distinguished road
Default 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
Which searches the whole document and puts the "inQuotes" style to anything in quotes.


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?
Reply With Quote
  #2  
Old 12-10-2019, 04:03 PM
Guessed's Avatar
Guessed Guessed is offline Change style when quote Windows 10 Change style when quote Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #3  
Old 12-10-2019, 07:00 PM
macropod's Avatar
macropod macropod is offline Change style when quote Windows 7 64bit Change style when quote Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

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
Change style when quote Modifying horizontal rules in Intense Quote style oakb Word 2 03-28-2017 05:02 PM
Change style when quote change Bibliography style SashikalaB Word VBA 1 02-06-2017 11:44 PM
Change style when quote Change style of formulas Jacky837 Word 3 08-08-2016 11:27 AM
Change style when quote How to globally change the formatting of a bullet style to another style? ravl13 Word 5 03-10-2013 05:04 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft