Thread: [Solved] Use of Range Object Question
View Single Post
 
Old 08-14-2012, 04:22 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

OK, with your code, you're formatting the whole document with 12pt bold text, centred paragraphs. Is that what you really want?

It is always better to use appropriately-defined paragraph Styles for managing document formatting, rather than overriding an existing Style with the format you want.

FWIW, to insert another paragraph is as simple as adding another line with:
.InsertAfter vbCr & "My New paragraph"
Then, of course, you'd want to format the new paragraph, for which you could use code like:
.Paragraphs.Last.Range.Style = "Some Style"
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote