Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Can't use word wrap in Word 2000 macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Babydoc - 05 Dec 2004 00:59 GMT
When I try to use the "Record New Macro" system in WD2000 to change an
in-line picture to be text-wrapped, the text wrapping options in the picture
formating dialog are grayed out. There is a tech note that describes a
similar problem (WD2000: Unable to Record Macro for Inline-to-Floating
Picture Conversion; Article ID : 209800)that says the work around is to
select the picture, cut it, then paste-special as a picture, then select it
and change the wrap option. This doesn't work (at least not in Word 2000 on
Wuindows 2000).

Is there a work around or a way to actually code this in the macro editor?
Jay Freedman - 05 Dec 2004 03:01 GMT
Hi Babydoc,

There's no way to do this with the macro recorder, or much else to do
with floating graphics. You have to write the macro directly in the
editor.

If you just want to convert the picture to text-wrapped (floating),
all you need is this:

   If Selection.InlineShapes.Count > 0 Then
       Selection.InlineShapes(1).ConvertToShape
   End If

If you also want to change the size, position, or other
characteristics of the picture once it's floating, you need to assign
the result of the ConvertToShape method to a Shape object so you can
apply the changes to that object, for example:

   Dim oShp As Shape
   If Selection.InlineShapes.Count > 0 Then
       Set oShp = Selection.InlineShapes(1).ConvertToShape
       With oShp
           .LockAspectRatio = msoTrue
           .Width = InchesToPoints(1)
           .WrapFormat.Type = wdWrapSquare
           .RelativeVerticalPosition = _
               wdRelativeVerticalPositionParagraph
           .Top = 6 ' points
       End With
   End If

--
Regards,
Jay Freedman
Microsoft Word MVP         FAQ: http://word.mvps.org

>When I try to use the "Record New Macro" system in WD2000 to change an
>in-line picture to be text-wrapped, the text wrapping options in the picture
[quoted text clipped - 6 lines]
>
>Is there a work around or a way to actually code this in the macro editor?
Babydoc - 05 Dec 2004 23:09 GMT
Jay,

Thanks! That worked. It was just what I needed.

> Hi Babydoc,
>
[quoted text clipped - 42 lines]
> >
> >Is there a work around or a way to actually code this in the macro editor?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.