Indexing of Selection Objects

Indexing of Selection Objects

Post by Jeremy Hadfie » Sat, 15 Dec 2001 13:47:08



Hello, my name is Jeremy.
I am trying to write a small script in VB to move a Selection of
Shapes from one page of a document to another and re-positioning the
shapes based on the order in which they were first selected.
How is the index of Selection objects determined?
I would be grateful for some help
 
 
 

Indexing of Selection Objects

Post by Reinier Po » Wed, 16 Jan 2002 07:53:04



>Hello, my name is Jeremy.
>I am trying to write a small script in VB to move a Selection of
>Shapes from one page of a document to another and re-positioning the
>shapes based on the order in which they were first selected.
>How is the index of Selection objects determined?

I don't know if it is stored.  You could maintain your own queue in a
Collection or array and update it in a SelectionChanged event handler.
(Handle deletions, too.)

--
Reinier

 
 
 

1. Range object, Selection object

I do not know whether I should use a Range obj or
Selection obj. I suspect I need a Range but I don't know
how to set the Range object (oRange) initially.

I need to format some text as TitleCase (wdTitleWord). The
text I am doing this to is a string:
  Word.ActiveDocument.Range.InsertAfter strString
where strString is my "unformatted" (ie, ALLCAPS instead
of TitleCase) string.

The thing is, I need the text to be title case. Only my
string needs to be title case, not the rest of the
document. So I thought maybe I needed to use a Range
object in order to accomplish this.
  set oRange = (this is what I don't know)
  oRange.Text = strString
  oRange.Case = wdTitleWord
  Word.ActiveDocument.Range.InsertAfter oRange
But as you can see, my object variable (oRange) is not
set. How do I set oRange = something so that I can use its
text and case properties and then paste in my TitleCase
text. Any advice appreciated.

2. Access Security Training

3. Too many indexes - Wierd hidden indexes preventing index add

4. printing escape sequences for direct printer control to print micr on checks

5. Combo box - How to get the value of the indexed selection

6. Excel XP crashes on font format

7. List Box Selection Problem with Index

8. Automatic calendar entries for sports events, etc

9. help catching duplicate index msg on item selection

10. Chart space Selection Index Example

11. Shape object index

12. Fast Array Search Tool using Collection Object as Index

13. Clearing Excel Sheet Object Index