Thread: [Solved] Use of Range Object Question
View Single Post
 
Old 08-14-2012, 05:35 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit 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