Picture Behind Text Macro

O

Owen

I have an existing macro which copies a picutre that is within my document
and pastes it to another location within the same document.

I want to be able to send the pasted picture "behind text". I have tried to
record a macro to examine the code, however when i access
Format|Picture|Layout, all the options on the Layout tab are disabled.

Appreciate any help you can offer to enable this to occur within my macro
coding.

Thanks
 
G

Graham Mayor

The macro recorder is incapable of this action. An inline shape (I assume
the picture is originally inserted in line) cannot have a wrap option. It
must first be converted to a shape and then the wrap can be applied eg

Dim oShp As Shape
With Selection.InlineShapes(1)
Set oShp = .ConvertToShape
End With
oShp.WrapFormat.Type = wdWrapBehind

http://www.gmayor.com/installing_macro.htm
Please not that there are separate forums for Word vba questions.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
O

Owen

Thanks a lot Graham.

Graham Mayor said:
The macro recorder is incapable of this action. An inline shape (I assume
the picture is originally inserted in line) cannot have a wrap option. It
must first be converted to a shape and then the wrap can be applied eg

Dim oShp As Shape
With Selection.InlineShapes(1)
Set oShp = .ConvertToShape
End With
oShp.WrapFormat.Type = wdWrapBehind

http://www.gmayor.com/installing_macro.htm
Please not that there are separate forums for Word vba questions.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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