Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2012, 04:51 PM
jsb73 jsb73 is offline Use of Range Object Question Windows 7 32bit Use of Range Object Question Office 2007
Novice
Use of Range Object Question
 
Join Date: Aug 2012
Posts: 4
jsb73 is on a distinguished road
Default

Thanks again Paul. I am still a bit confused. Are you saying it is best not to sart with fomatting the Document.Range, but better to start by adding paragraphs using InsertAfter then adding the paragraph styles for each paragraph?
Reply With Quote
  #2  
Old 08-14-2012, 05:35 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

Quote:
Originally Posted by jsb73 View Post
Thanks again Paul. I am still a bit confused. Are you saying it is best not to sart with fomatting the Document.Range, but better to start by adding paragraphs using InsertAfter then adding the paragraph styles for each paragraph?
Pretty much, yes. Of course, if you have many paragraphs to insert and most of them are to be in the same Style, you might start off by applying that Style to the whole document, insert all the text, then apply the alternative Styles to the paragraphs that need them. There are numberous possible approaches, none of which is necessarily 'right' and the others 'wrong'; it all comes down to what's easiest to develop, maintain and execute. The important point, though, is to avoid overriding Style formats - doing so can create all sorts of problems for users later on.

PS: There's an .InsertBefore method too.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

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 12:51 PM.


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