oaktrees
asked on
Word Style Indents AND Adds Quotation Marks to Beginning and End of Text
Have a long document. It's about 1:5 of quotes:explication.
Have a word style for the quotes which indents them.
For the explication I leave them unindented.
So, it looks like
The coin I pulled from the bag is a penny. That coin is a penny. A third coin from the bag is a penny. Therefore, all the coins in the bag are pennies.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Can easily indent the quotes with a Style, leaving the explications under Normal, unindented. Is there any way to ALSO add applying quotation marks to the style? So that, as I'm going through the paragraphs and applying the style to quotes, they not only get indented, but quotation marks are also added at the beginning and end of each styled paragraph?
So, it would look like:
"The coin I pulled from the bag is a penny. That coin is a penny. A third coin from the bag is a penny. Therefore, all the coins in the bag are pennies."
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Thanks!
OT
Have a word style for the quotes which indents them.
For the explication I leave them unindented.
So, it looks like
The coin I pulled from the bag is a penny. That coin is a penny. A third coin from the bag is a penny. Therefore, all the coins in the bag are pennies.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Can easily indent the quotes with a Style, leaving the explications under Normal, unindented. Is there any way to ALSO add applying quotation marks to the style? So that, as I'm going through the paragraphs and applying the style to quotes, they not only get indented, but quotation marks are also added at the beginning and end of each styled paragraph?
So, it would look like:
"The coin I pulled from the bag is a penny. That coin is a penny. A third coin from the bag is a penny. Therefore, all the coins in the bag are pennies."
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Thanks!
OT
ASKER
I wonder if there is a way to achieve what I want via Macro. So that the Macro BOTH applies quotes AND applies a Style called via the Macro?
Sincerely,
OT
Sincerely,
OT
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Eric!
WOW! This looks cool. I'm confused - will this add quotes AND set a style simultaneously?
Sincerely,
OT
WOW! This looks cool. I'm confused - will this add quotes AND set a style simultaneously?
Sincerely,
OT
Yes. The code is just a recording of manual actions: Ctrl-UpArrow brings the focus to the beginning of a paragraph; pressing Alt-0147 inserts a typographical open quote; Ctrl-DownArrow jumps to the start of the next paragraph; BackArrow moves to the end of the previous paragraph; Alt-0148 adds the closing typographical quote; the style is set; and the final Ctrl-DownArrow moves to the start of the next paragraph.
There are more sophisticated ways of doing this in VBA, but the recorder does a perfectly adequate job of automating fairly straightforward actions like this.
There are more sophisticated ways of doing this in VBA, but the recorder does a perfectly adequate job of automating fairly straightforward actions like this.
ASKER
Hi Eric,
Wow! I'm thinking this will be sort of the Bigfoot of macros - long discussed, rarely seen! Looking forward to giving it a try. Hope to find time to remember how to do Macros over the next few days. I'd feel grateful if you could keep an eye on this question. In case I can't get it to work.
Thanks again!
OT
Wow! I'm thinking this will be sort of the Bigfoot of macros - long discussed, rarely seen! Looking forward to giving it a try. Hope to find time to remember how to do Macros over the next few days. I'd feel grateful if you could keep an eye on this question. In case I can't get it to work.
Thanks again!
OT
You would have to make a Macro and adjust it to your requirements. The article below talks about a Macro to add Quotes after the fact (which is what you want).
https://word.tips.net/T000009_Adding_Quotes.html