ShapeRange - 2 questions

D

David Thielen

D

David Thielen

Question 3 below (apparently I can't count as I forgot 2) I think is
Shape.Anchor. Is that correct?

Still wondering on question 1.

thanks - dave


Hi;

First off, a bitmap in a Word doc can be an InlineShape or a
ShapeRange depending on how it's located in the doc.

1) Is there a base class for Shape & InlineShape? It seems like there
should be, but it appears there is not.

3) How do I get the range of a Shape object? It has to be located
somewhere in the document.

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Colbert Zhou [MSFT]

Hello Dave,

1). ShapeRange means a collection of Shapes. Shape and InlineShape are two
interfaces in Word object model. They are just COM interfaces and COM
technology is not object oriented designed. So there is not a base class
for these two interfaces.
InlineShape means the Picture is inline with the text. And the common shape
is floated and can be anywhere on the surface of the page.

3). You are right. The Shape.Anchor returns a Range object that represents
the anchoring range for a specified shape. It is the shape's anchoring
range, but not the shape's range.
"All Shape objects are anchored to a range of text but can be positioned
anywhere on the page that contains the anchor. If you specify the anchoring
range when you create a shape, the anchor is positioned at the beginning of
the first paragraph that contains the anchoring range. If you don't specify
the anchoring range, the anchoring range is selected automatically and the
shape is positioned relative to the top and left edges of the page. The
shape will always remain on the same page as its anchor. If the LockAnchor
property for the shape is set to True, you cannot drag the anchor from its
position on the page.
"
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.shape.
anchor(office.11).aspx

If you have any future questions on this, just let me know. Have a nice day
sir!

Best regards,
Ji Zhou
Microsoft Online Community Support
 

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