Determine if selection is a image or object

F

Flemming Dahl

Hi all,

How do I determin if the selection is an image, textbox or just document
location?

Thanks,
Flemming
 
D

Dave Lett

Hi Flemming,

You might be able to use

Selection.Type

this will return one of the following WdSelectionType constants
wdSelectionBlock
wdSelectionFrame
wdSelectionIP
wdSelectionRow
wdNoSelection
wdSelectionColumn
wdSelectionInlineShape
wdSelectionNormal
wdSelectionShape


HTH,
Dave
 
J

Jezebel

The Selection is always a Range (by definition). The questions to ask are a)
what storyrange you are in, and b) what objects, if any, are contained
within that range.

Start with the Selection.Information() function.

Use the Count property of the various object collections -- eg If
Selection.Shapes.Count > 0 ...

Compare the Selection's Start and End values to determine if the selection
is a point or a span of document.
 
F

Flemming Dahl

Thanks Dave this I can use :)

Flemming


Dave Lett said:
Hi Flemming,

You might be able to use

Selection.Type

this will return one of the following WdSelectionType constants
wdSelectionBlock
wdSelectionFrame
wdSelectionIP
wdSelectionRow
wdNoSelection
wdSelectionColumn
wdSelectionInlineShape
wdSelectionNormal
wdSelectionShape


HTH,
Dave
 
Top