How to Change Font Styles in Word Document with VB.net

  • Thread starter Thread starter Art
  • Start date Start date
A

Art

Hello,

I'm writing a VB app under Visual Studio 2005 that is to generate a word
document using MS Office Word 2007.

As I generate new lines of text, it seems to be using the 'Normal' fonts so
that each time I execute a ".Range.InsertParagraphAfter()" statement, it
looks like it is double spacing each line. I'd like to change the font style
to 'No Spacing' as that seems to make each line closer to one another. This
may not be the best way to do it but it's the only way I can see to make it
work when I mess around with actually changing the fonts with MS Word itself.
So I'd could use anything else that might work.

Anyway, thanks in advance.
 
Art,

See if this works for you:

' Set the document's spacing to single
Dim originalLineSpacing = patientDoc.Paragraphs.LineSpacing
' = 13.8(this was too much).
patientDoc.Paragraphs.LineSpacing = 10

Paul
 
Back
Top