bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Macros > How to Paste Non-Floating Pictures with a Macro

How to Paste Non-Floating Pictures with a Macro

Summary: Using a macro to paste pictures inline instead of floating in Word 97. (This tip works with Microsoft Word 97.)

Subscriber Jos Wessels wrote about a problem he was having with pasting pictures into a Word document. Since he pastes a lot of them, particularly into tables, he is interested in having them pasted inline instead of as floating pictures.

The behavior being described indicates that Word 97 is being used. By default, Word 97 would paste pictures as "float over" rather than "inline." Microsoft has since changed this behavior, as Word 2000 and Word 2002 both paste pictures inline by default. Microsoft even provided a Knowledge Base article that covers this very topic:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q163808

The article includes a macro-based workaround. There is a simpler solution, however, that may work for most people's needs. You can record your own macro to do your placements. If you do so, however, you will need to do just a bit of editing. When you paste pictures Word does not allow you to go back and modify the graphic, within the macro recorder, to change whether the graphic is inline or floating. This behavior exists in not only Word 97, but also later versions of Word. Who knows why; the reasoning is not apparent since you can modify graphic attributes within VBA, just not in the macro recorder itself.

To create your own quick-and-dirty macro, follow these general steps:

  1. Copy a graphic to the clipboard.
  2. Turn on the macro recorder.
  3. Paste the graphic.
  4. Turn off the macro recorder.
  5. Use the VBA Editor to display the macro you just recorded. It should appear similar to the following:
     Sub PasteGraphic()
     '
     ' PasteGraphic Macro
     ' Macro recorded 2/8/2002 by Allen L. Wyatt
     '
         Selection.Paste
     End Sub
  • Modify the macro so it appears as follows:
  •      Sub PasteGraphic()
         '
         ' PasteGraphic Macro
         ' Macro recorded 2/8/2002 by Allen L. Wyatt
         '
             Selection.PasteSpecial Placement:=wdInLine
         End Sub
    
  • Close the VBA Editor.
  • That's it. You now have a macro that will paste your graphic as inline.

    For related information, see the following topics and articles in WordTips Online Answers:

    Creating Macros: http://wtonline.vitalnews.com/wto213.html
    

    Tip #1600 applies to Microsoft Word versions: 97


    Save Time! WordTips has been published weekly since early 1997. Past issues are available in convenient WordTips archives. Have your own enhanced archive of WordTips at your fingertips, available to use at any time!
     
    Check out WordTips Archives today!

    Helpful Links

    Ask a Word Question
    Make a Comment

    Tips.Net Home
    Tips.Net Store

    WordTips FAQ
    WordTips Premium

    Learn Access Now

    Beauty Tips
    Bugs and Pests Tips
    Car Tips
    Cleaning Tips
    College Tips
    Cooking Tips
    Excel2007 Tips
    ExcelTips
    Family Tips
    Gardening Tips
    Health Tips
    Home Tips
    Money Tips
    Organizing Tips
    Pet Tips
    Word2007 Tips
    WordTips

    Advertise on the
    WordTips Site

     

    Great Info!

    Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
         
    (Your e-mail address will never be shared with anyone, ever.)