Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Fri, 30 May 2008 13:04:13 +0100,    group: microsoft.public.word.vba.beginners        back       


Macro to work on picture   
I'm trying to record a macro to automate something I commonly do with a 
newly-inserted picture, namely put it in a "frame" to make it moveable and 
resizeable. I do this via: right-click it > Format Picture > Layout tab > 
select "Square" Wrapping Style > OK

But once in "recording" mode for the macro, I can't right-click the picture; 
and if I use the Word menu to get there, Format > Picture, the "wrapping 
style" buttons are inactive, can't be clicked.

Is there a way around this, or can macros just not be applied when a picture 
is selected?

Many thanks.
date: Fri, 30 May 2008 13:04:13 +0100   author:   Ol?rin

Re: Macro to work on picture   
Hi Olórin,

there are limits to recording macros.
Some things just don't work.

Try:

Sub Test400A()
Dim MyShape As Shape
Set MyShape = Selection.InlineShapes(1).ConvertToShape
MyShape.WrapFormat.Type = wdWrapSquare
End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
date: Fri, 30 May 2008 14:39:07 +0200   author:   Helmut Weber

Re: Macro to work on picture   
"Helmut Weber"  wrote in message 
news:j9tv34thqc180h6pvnchb9f1rdom2ib7en@4ax.com...
> Hi Olórin,
>
> there are limits to recording macros.
> Some things just don't work.
>
> Try:
>
> Sub Test400A()
> Dim MyShape As Shape
> Set MyShape = Selection.InlineShapes(1).ConvertToShape
> MyShape.WrapFormat.Type = wdWrapSquare
> End Sub
>
> --
>
> Greetings from Bavaria, Germany
>
> Helmut Weber, MVP WordVBA
>
> Vista Small Business, Office XP


That worked perfectly, Helmut - many thanks!
date: Mon, 2 Jun 2008 12:32:56 +0100   author:   Ol?rin

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us