• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Developing Smart Document Sol... > A Few Last Words on Smart Documents

5.9. A Few Last Words on Smart Documents

Now that you've seen the parts involved, it's worth considering which aspects of Smart Documents need your focus.

5.9.1. Range and Selection Objects

The Word object model consists of hundreds of objects, yet no two are more powerful than range and selection. These two objects are used to identify the parts of the document that are to be manipulated by the accompanying code. What is confusing is that, for most cases, either object can be used. The main difference is that a range is not visible to the end user; that is, you can identify a range and manipulate it, and the end user's cursor location will not move. selection, on the other hand, does exactly what you'd expect—literally highlighting the selection on the end user's screen. More often than not, range is preferred over selection for several reasons, not the least of which is performance.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint