I would like to cycle thru the inline shapes collection to change the
wrapformat property of each shape to wdWrapTight.

My code:

Dim shp as Shape
Dim shps as Shapes
set shps = ActiveDocument.Shapes

For Each shp in shps
if shp.Type = msoPicture then
with shp
.Wrapformat.AllowOverlap = True
.WrapFormat.Type = wdWrapTight
end with
End if
Next 'shp

This doesn't seem to do anything to the document's pictures (though it does
run).

I've tried using a collection of inlineshapes, but that doesn't seem to
allow the .WrapFormat property

Using record macro, I get the following code:
Selection.ShapeRange.WrapFormat.Type = wdWrapTight

but I can't figure out how to use this syntax with a collections object, to
go through all the pictures in the document.

What am I doing wrong?

A second minor question: Using the Watch window, I can see the shape
properties of the current shp object. How can I match the ID or name of the
shape object to the actual picture object in the document, so that I can
visually check that something is happening to it (I have a lot of pictures in
this document - and I don't know which is the current shape object my code is
working on). I can't find anyway to show the properties of the picture
object in Normal (or any other view).

Thanks!

Re: Wrapformat inline shapes by Jonathan

Jonathan
Tue Sep 18 11:48:18 CDT 2007


"Post Tenebras Lux" <PostTenebrasLux@discussions.microsoft.com> wrote in
message news:E38DC833-502F-4603-8C03-01354D5587E1@microsoft.com...

>
> What am I doing wrong?

You aren't converting the InlineShapes to Shapes first. Only Shapes can
allow text to be wrapped, and so only Shapes have a Wrapformat.

>
> A second minor question: Using the Watch window, I can see the shape
> properties of the current shp object. How can I match the ID or name of
> the
> shape object to the actual picture object in the document, so that I can
> visually check that something is happening to it (I have a lot of pictures
> in
> this document - and I don't know which is the current shape object my code
> is
> working on). I can't find anyway to show the properties of the picture
> object in Normal (or any other view).


Select the Shape (or InlineShape) object.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


Re: Wrapformat inline shapes by PostTenebrasLux

PostTenebrasLux
Tue Sep 18 15:00:01 CDT 2007

thanks, but I'm trying to automate (cycle thru) 100 shape objects. I know
how to do it manually.



"Jonathan West" wrote:

>
> "Post Tenebras Lux" <PostTenebrasLux@discussions.microsoft.com> wrote in
> message news:E38DC833-502F-4603-8C03-01354D5587E1@microsoft.com...
>
> >
> > What am I doing wrong?
>
> You aren't converting the InlineShapes to Shapes first. Only Shapes can
> allow text to be wrapped, and so only Shapes have a Wrapformat.
>
> >
> > A second minor question: Using the Watch window, I can see the shape
> > properties of the current shp object. How can I match the ID or name of
> > the
> > shape object to the actual picture object in the document, so that I can
> > visually check that something is happening to it (I have a lot of pictures
> > in
> > this document - and I don't know which is the current shape object my code
> > is
> > working on). I can't find anyway to show the properties of the picture
> > object in Normal (or any other view).
>
>
> Select the Shape (or InlineShape) object.
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
>
>

Re: Wrapformat inline shapes by PostTenebrasLux

PostTenebrasLux
Tue Sep 18 15:06:02 CDT 2007

After I select the Shape object (in the document - not via code), where do I
find the value for the ID or object name?

"Jonathan West" wrote:

>
> "Post Tenebras Lux" <PostTenebrasLux@discussions.microsoft.com> wrote in
> message news:E38DC833-502F-4603-8C03-01354D5587E1@microsoft.com...
>
> >
> > What am I doing wrong?
>
> You aren't converting the InlineShapes to Shapes first. Only Shapes can
> allow text to be wrapped, and so only Shapes have a Wrapformat.
>
> >
> > A second minor question: Using the Watch window, I can see the shape
> > properties of the current shp object. How can I match the ID or name of
> > the
> > shape object to the actual picture object in the document, so that I can
> > visually check that something is happening to it (I have a lot of pictures
> > in
> > this document - and I don't know which is the current shape object my code
> > is
> > working on). I can't find anyway to show the properties of the picture
> > object in Normal (or any other view).
>
>
> Select the Shape (or InlineShape) object.
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
>
>

Re: Wrapformat inline shapes by Jonathan

Jonathan
Wed Sep 19 04:12:16 CDT 2007


"Post Tenebras Lux" <PostTenebrasLux@discussions.microsoft.com> wrote in
message news:4FE4EA67-81A0-47F0-B093-F9CBB4238DF0@microsoft.com...
> thanks, but I'm trying to automate (cycle thru) 100 shape objects. I know
> how to do it manually.
>

I'm not telling you ho to do it manually. I'm telling you to use the Select
method to show on the editing window which object your code is working on.

You can also pick up the Name property of the object. The Names of all
Shapes and InlineShapes in a document are unique.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup