Setting "Behind Text" Property for a Picture Programatically

J

JohnJohn

Hello.

I am inserting a picture to a Word document opened through VBA from a Visual
Basic program. I am using the InlineShapes.AddPicture method to insert the
picture.

What I would like to do is to set the layout wrapping style for the picture
to "Behind text" as you can do through the Word interface (by right-clicking
the picture, selecting the "Layout" tab, and clicking "Behind text") . But I
want to do it with code only, as the Word interface is hidden during runtime.

Anyone know how to do that? Haven't been able to find much info in the
internet.

Thanks!
John
 
D

Dawn Crosier

InlineShapes do not have the property of layout wrapping..

Instead, you will need to insert your picture as a Shape.

ActiveDocument.Shapes.AddPicture("C:\....")

Then you can set the zOrder of the Shape to send it backward

--
Dawn Crosier
Microsoft MVP
"Education Lasts a Lifetime"

This message is posted to a newsgroup. Please post replies and
questions to the newsgroup so that others can learn as well.

Hello.

I am inserting a picture to a Word document opened through VBA
from a Visual
Basic program. I am using the InlineShapes.AddPicture method to
insert the
picture.

What I would like to do is to set the layout wrapping style for
the picture
to "Behind text" as you can do through the Word interface (by
right-clicking
the picture, selecting the "Layout" tab, and clicking "Behind
text") . But I
want to do it with code only, as the Word interface is hidden
during runtime.

Anyone know how to do that? Haven't been able to find much info
in the
internet.

Thanks!
John
 

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