How to Paste Non-Floating Pictures with a Macro

by Allen Wyatt
(last updated February 21, 2008)


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:;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
     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:

    WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1600) applies to Microsoft Word 97.

    Author Bio

    Allen Wyatt

    With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...


    Returning the Left-most Characters

    When working with text in a formula, you may need to extract the left-most characters from a string of text or from a ...

    Discover More

    Adjusting Row Height when Wrapping Text

    If you have some cells merged in a worksheet, and you wrap text within that merged cell, Excel won't automatically resize ...

    Discover More

    Excel Serious Sorting (Special Offer)

    Excel Serious Sorting shows you how to put your data into the order that makes best sense. Increase your ...

    Discover More

    Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

    More WordTips (menu)

    Repaginating Your Document in a Macro

    When processing a document with a macro, you may need to have the macro repaginate the text. It's easy to do using the ...

    Discover More

    Resetting Character Formatting in a Macro

    Want your macro to get rid of the formatting applied to a selection of text? It's easy enough to do using the Reset ...

    Discover More

    Changing Roman Numerals to Arabic

    In some documents Roman numerals might be used quite a bit. If you ever want to change the Roman numerals to their Arabic ...

    Discover More

    FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

    View most recent newsletter.


    If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

    What is four more than 1?

    2016-03-04 06:23:54

    Ken Endacott

    Jay B. I felt the same as you when I went through a leaning curve on switching to Object Orientated Languages after many years programming in "straight" languages.

    What you want to achieve requires a moderately complex VBA program and not just a few individual commands. There are plenty of VBA self-learn web sites but it will still require time, dedication and of course practice to achieve the necessary competence to write such a program.

    2016-03-03 12:54:31

    Jay B

    In searching through your Macros tips page I came upon this "How to Paste Non-Floating Pictures with a Macro" tip. Unfortunately it is not quite what I am looking for but it seems to be the closest that you come to covering it.
    I am running word 2003. What I am looking for is the VBA command or commands that I would use in a macro to obtain a list of the the picture files in a directory, (I assume that I would have to have them named so that they could be identified by selecting the files that matched a specified pattern). Then using that list I want to insert insert the pictures, perhaps just a specific number of them, into the document along with the unique portion of the file name. When the macro has finished I want the pictures to be inserted as Square layout, left justified to the margin, text wrap right, top aligned to the margin. The text containing the unique part of the file name needs to be at the top of the page right justified.
    I am a retired software developer so I understand programming, but these object oriented languages confound me. I look at the reference material and I have no idea where to look for what I want to accomplish, the organization of them is foreign to me and to the way the languages that I learned were documented.

    This Site

    Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

    Newest Tips

    FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

    (Your e-mail address is not shared with anyone, ever.)

    View the most recent newsletter.