PDA

View Full Version : VBA For Font



vladf0
07-02-2011, 09:37 AM
Hello everyone!
I am new on this forum and I think this is the best place to find answers for my problems (that is why I had registered). I am sure I will not be disaoppointed.
My problem is that I need to make a Macro that allows for me to press a key shortcut and run the next type of text format and after I finish typing the text, a next use of the key shortcut would get the font and text format to deafult.
The text format that I need is this:

Bold Text in Times New Roman at 20 Bold and Underlined Text in Times New Roman at 20 AND FINNALY TEXT IN TMES NEW ROMAN AT 12 WITHOUT BOLD OR UNDERLINE



The order should be the same and for the transition between texts should be used two or three spaces (to seprate them from the normal transition between the word in the text that has only one space)


I have confidence in this forum and the users that they will help me. Thank you!

macropod
07-02-2011, 10:10 PM
Hi vladf0,

It seems to me you could achieve most of what you're after quite consistently via the proper use of Paragraph Styles, without the need for any macros. As part of any given Paragraph Style definition, you can specify the Style default for the following paragraph.

Talis
07-03-2011, 01:14 PM
Not sure these are sequential paragraphs in which case...
Could you define the style: Bold Text in Times New Roman at 20
Start typing (and you'll have to add your own spaces!).
When you want to change press CTRL U to go to underline.
When you want to change again press CTRL U then CTRL SHIFT N to go into Normal style providing your last style requirement is your Normal style.