collapse a bookmark

M

mark kurten

could someone please give me an example of why you would use the collapse
method of a bookmark?
I can't think of a real world use of that method.

thanks.
 
P

Peter Hewett

Hi mark kurten

There a little confusion here. Collapse is not a method of a Bookmark object, it the
method of a Range object. It just so happens that like numerous other objects a Bookmark
object has a Range property. The Range object maps the actual text in the document, it
additionally specifies which StoryType the Range object applies to.

You frequently want to collapse a Range object (either forward or backwards) so that you
might insert text either before or after the Range.

HTH + Cheers - Peter
 
W

Word Heretic

G'day "mark kurten" <[email protected]>,

The Range object is the Bookmark's default method, so it's a little
misleading. Also, in the real world, as spanned bookmarks go crazy
with editing, collapsed ranges are oft neater solutions for marking
points of reference. Additionally, as a developer, you often use them
for in-document placeholders. "I processed up to HERE."

Now we both know that collapse on a Range object is damn useful, and
as its the default for the bookmark object you get it there for free
as well. 32 for the price of 1.


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


mark kurten reckoned:
 
M

Mark Kurten

You frequently want to collapse a Range object (either forward or backwards) so that you
might insert text either before or after the Range.

-This is where confusion enters..why do you need to collapse the range to
enter data before or after the range..if i call the insertbefore or
insertafter methods, won't this do the same thing?

thanks.
 
W

Word Heretic

G'day "Mark Kurten" <[email protected]>,

For some solutions, yes, you can just do that. Its a methodology
thing. For example, I want to find my bookmark then get the next para
after it.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Mark Kurten reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top