Log in

View Full Version : Changing line font



rohan4069
10-25-2012, 06:21 AM
Hi all

The company i work for in that we send letters to clients. I have created a userform which take cares of all the line feeds, font size, alignment etc. The first 2 lines of the letter are left blank and the font size should be 14. I am able to do it with the following code:


Sub LineFont()

Dim rng As Range
Set rng = ActiveDocument.Range
Application.ScreenUpdating = False

rng.Start = ActiveDocument.Paragraphs(1).Range.Start
rng.End = ActiveDocument.Paragraphs(2).Range.End

rng.Font.Size = 14

Application.ScreenUpdating = True

End Sub

The problem occurs if it is a joint a/c and a letter should be sent to both the a/c holders. I am not able to change the font size for the second holder.

Any suggestions?

Thanks in advance

fumei
10-25-2012, 03:02 PM
The first two paragraphs are "empty"? This is poor use of Word. You should use styles, which could easily take care of creating space.

If the letter goes to two account holders, why not send the same letter? Assuming different names at the top. I am not sure why you can not "change the font size for the second holder". Why not? What is stopping you? Why would the code you have not work?

It seems odd to use VBA for this.