Multiple selection

A

Alex

With Word, it is possible to select multiple pieces of text at one (using the CTRL key).

For example, given the following text:

12345<p>
67890<p>

I can mark "234", press the CTRL key and mark "789".

My question is:
How can I detect that a selection is comprised of multiple parts and how do I access each part?

Thank you.


Best wishes,
Alex.
 
J

Jay Freedman

With Word, it is possible to select multiple pieces of text at one (using the CTRL key).

For example, given the following text:

12345<p>
67890<p>

I can mark "234", press the CTRL key and mark "789".

My question is:
How can I detect that a selection is comprised of multiple parts and how do I access each part?

Thank you.


Best wishes,
Alex.

Hi Alex,

The programmatic support for multiple selections is really crappy, and
it hasn't improved between Word 2002 and 2003. All the usable
information I know of is in this article:
http://support.microsoft.com/kb/q288424/.
 
A

Alex

Hello Jay,

Jay Freedman said:
The programmatic support for multiple selections is really crappy, and
it hasn't improved between Word 2002 and 2003. All the usable
information I know of is in this article:
http://support.microsoft.com/kb/q288424/.

Thanks.

Is there a way to find out that a selection is discontiguous, or must I do a Selection,ShrinkDiscontiguousSelection every time to be sure?


Best wishes,
Alex.
 
J

Jay Freedman

Hello Jay,



Thanks.

Is there a way to find out that a selection is discontiguous, or must I do a Selection,ShrinkDiscontiguousSelection every time to be sure?


Best wishes,
Alex.

I'm not aware of any other way to handle it. OTOH, it depends on what
you're doing with the selection.

If you're applying formatting of the kinds in the first list, you
don't want to shrink the selection -- that would cause the formatting
to apply only to the last piece. If you're inserting text, it doesn't
make any difference whether you shrink first or not. If you're
converting the text to a table, you have to shrink it first or else
use error-trapping.
 
A

Alex

Hello Jay,

Jay Freedman said:
I'm not aware of any other way to handle it. OTOH, it depends on what
you're doing with the selection.

If you're applying formatting of the kinds in the first list, you
don't want to shrink the selection -- that would cause the formatting
to apply only to the last piece. If you're inserting text, it doesn't
make any difference whether you shrink first or not. If you're
converting the text to a table, you have to shrink it first or else
use error-trapping.

I just want to determine whether the selection is discontiguous or not.


Best wishes,
Alex.
 

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