Shape

R

RRodrigues

I want to remove all the Shapes that are in the top of InlineShapes, and ONLY
those.
I already have a code that select the InLineShape and format them.
What I can't do, is Delete all the Shapes in the select Paragraph, or in the
InlineShapes.
Can you help me with this?
 
J

Jean-Guy Marcil

RRodrigues was telling us:
RRodrigues nous racontait que :
I want to remove all the Shapes that are in the top of InlineShapes,
and ONLY those.

Sorry, but I don't quite get what you mean by this.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
R

RRodrigues

Ok, let me rephrase it.
In my document, I have several pictures.
In some of them, I have drawn some shapes.
Now I want to delete the shapes that are in the top of the pictures.
However, I have also made some shapes in the rest of the document, and I
want to keep these ones.
I guess one of the ways, is selecting the Paragraphs that contain the Inline
Shapes, and then Delete the Shapes in the Selection.
I have already created a code that selects these Paragraphs.
What I need is a code to delete the Shapes that are in this selection.
Can you help me with this?
 
J

Jay Freedman

Use this code:

On Error Resume Next
Selection.Range.ShapeRange.Delete

It will delete any floating shapes but leave inline shapes intact.
(The On Error statement prevents a "Requested object is not available"
error if the paragraph doesn't contain any floating shapes.)

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
R

RRodrigues

Thank you! That was perfect! You're the best!

Jay Freedman said:
Use this code:

On Error Resume Next
Selection.Range.ShapeRange.Delete

It will delete any floating shapes but leave inline shapes intact.
(The On Error statement prevents a "Requested object is not available"
error if the paragraph doesn't contain any floating shapes.)

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

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