Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 08-14-2012, 04:22 PM
macropod's Avatar
macropod macropod is offline Use of Range Object Question Windows 7 64bit Use of Range Object Question Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
 

Tags
range, vba word



Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of Range Object Question Range.Information(wdStartOfRangeRowNumber): Application-defined or Object-defined err tinfanide Excel Programming 2 06-09-2012 10:19 AM
Use of Range Object Question use VBA to name a range g48dd Excel Programming 7 06-20-2011 06:34 AM
Problem: object library invalid or contains references to object definitions aligahk06 Office 0 08-19-2010 12:29 PM
Could not load this object as this object is not present in your computer k.gaurav Office 0 08-17-2009 09:57 PM
Categories question & replying with attachment question glitzymama Outlook 0 03-15-2006 09:32 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft