#1
|
|||
|
|||
How to write a macro for bolding text between quotes
Hi,
In Word 2016, I would like to create two different macros and have no idea how that could be done. This would save me many hours of work. 1. The first will bold all text found between two quotation marks. For example "this is the text I want to bold" 2. A second macro that would set all type between to 2 brackets to a Times New Roman size 12 font. Example: (Text here to size 12) I have many documents to format each with 100's of these types of changes. Any help would be appreciated. JJ |
#2
|
||||
|
||||
You don't need a macro to do any of that on a single document. In fact, it can all be done with two wildcard Find/Replace actions, where:
Find = ["“]*["”] Replace = ^& and you set the replacement font attributes to bold, and Find = \(*\) Replace = ^& and you set the replacement font attributes to Times New Roman size 12. The macro recorder will record the essential details and, for a macro to do a Find/Replace on all documents in a selected folder, see: https://www.msofficeforums.com/134542-post2.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
thanks
Thanks, I will try to record a macro with this...
One more question, I noticed now that some words in brackets are in uppercase letters. eg. (WORD) how can I make all letters or words in brackets to default back to lower case? Thanks so much for the above macros. You saved me many hours of work. |
#4
|
||||
|
||||
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
macro, type 1 fonts |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to write bold and unformatted text in a single cell | Snoorelax | Word VBA | 2 | 06-27-2018 06:24 PM |
How to replace straight quotes with smart quotes in existing document | PABwriter | Word | 4 | 05-27-2016 03:36 PM |
Creating macro in 2007 to bold within quotes on the fly | marymaryt | Word VBA | 5 | 06-01-2015 06:55 AM |
Bolding in script | ksigcajun | Word VBA | 10 | 02-23-2015 08:29 AM |
macro to format selected text with curly quotes | ysostarman | Word VBA | 10 | 11-11-2014 12:51 PM |