YveKe
Tue Jul 11 19:41:01 CDT 2006
Hi Jay
I quickly created a macro below and as you can see it has inserted a
clipart, but how can i change the code so that it will wrap... .. just
removing the "Inline" didn't work... thanks in anticipation..
Selection.InlineShapes.AddPicture FileName:= _
"C:\Documents and Settings\Staff\Local Settings\Temporary Internet
Files\Content.IE5\RMZRVE6M\MCj04112920000[1].wmf" _
, LinkToFile:=False, SaveWithDocument:=True
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
"Jay Freedman" wrote:
> The fact that all those wrapping choices are on the same button in the
> toolbar is deceiving. When you deal with graphics in VBA, you need to
> know that there are two completely separate collections of objects to
> represent graphics: ActiveDocument.InlineShapes contains all the
> in-line graphics, and ActiveDocument.Shapes contains all the floating
> (wrapped) graphics.
>
> You can use separate statements for inserting the two kinds to begin
> with,
>
> ActiveDocument.InlineShapes.AddPicture FileName:="c:\blah.jpg"
>
> and
>
> ActiveDocument.Shapes.AddPicture FileName:="c:\blah.jpg"
>
> (each of which has numerous optional parameters to control position in
> the document).
>
> Alternatively, you can insert an InlineShape and then convert it to a
> shape and format it with a series of statements like
>
> Dim myShape As Shape
> Set myShape = ActiveDocument.InlineShapes(1).ConvertToShape
> With myShape
> .RelativeHorizontalPosition = _
> wdRelativeHorizontalPositionPage
> .RelativeVerticalPosition = _
> wdRelativeVerticalPositionPage
> .Top = 36 ' measured in points
> .Left = 72
> .WrapFormat.Type = wdWrapSquare
> End With
>
> Look in the VBA help for all these terms, plus the definitions of the
> properties and methods that apply to InlineShape and Shape objects.
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ:
http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
>
> On Tue, 11 Jul 2006 16:08:01 -0700, Yve Ke
> <YveKe@discussions.microsoft.com> wrote:
>
> >Hi
> >
> >Is there some way to insert a word art (or graphic) in a macro procedure and
> >get it to wrap - the wrapping is the bit i don't seem to be able to get it to
> >wrap - the options in the toolbar are dimmed.
> >
> >Thanks for your help
> >
> >Yve
>