Wednesday, February 15, 2012

Alternate styling in word [With Macro]

Call me lazy,

I would rather write a script to do alternate bold and not bold of paragraphs than do it manually.

So, here is the script

sub i_am_not_lazy()

Dim para As Paragraph
Dim i As Integer
i = 1
For Each para In Selection.Paragraphs
If i Mod 2 = 0 Then
para.Range.Font.Bold = True
Else
para.Range.Font.Bold = False
End If
i = i + 1
Next

end sub



here is the result...



Dear aaa,
I am not trying to be lazy but I have some 50 plus questions
and
 I have to insert answers in between them in BOLD.
I am trying to find out if we have some smart idea to do.
Thank you for your post. I really was not looking for using CTRL B button because I have to press it everytime I enter answers.
Your response for putting macros seemed useful, but I still did not get how to use it.
Can you please guide me through the steps?
Thank you so much
aaa!!

No comments:

Post a Comment