Forum Discussion
Use style to add quotation marks
- May 25, 2022
mparento While you cannot include the quotation marks as part of the style, using a macro such as the following, you could have the style specified in the macro applied to the selected text and have quotation marks inserted before and after it
Set rng = Selection.Range With rng .Style = "Strong" .InsertBefore Chr(34) .InsertAfter Chr(34) End With
mparento While you cannot include the quotation marks as part of the style, using a macro such as the following, you could have the style specified in the macro applied to the selected text and have quotation marks inserted before and after it
Set rng = Selection.Range
With rng
.Style = "Strong"
.InsertBefore Chr(34)
.InsertAfter Chr(34)
End With
- mparentoMay 26, 2022Copper Contributor
Thanks Doug for the good idea! I was hoping to do it with the style itself. That way, if I change my mind, I could modify the style and update the whole document. With the macro, I assume that I would have to run it on each occurrence to add/remove the quotation marks. That being said, I may find you suggestion very helpful in other situations.
Addendum: thinking about it a bit more, I may use your suggestion in the present case. It would make it easier to add the quotation marks. Thanks again!