Search code examples
vbams-wordribbonword-2007

Add Document in Word Using Macro (in Ribbon)


I have a custom Ribbon in MS Word 2007 that I have a number of macros in.

The existing macros do things like:

  • Sort formatting
  • Find & replace text
  • Add header & footer

I'd like to have another macro that will add a document, within my document. These are basically information leaflets that will be added to a letter as required. I don't want the user to have to open the existing leaflet documents, just select the appropriate one from the Ribbon to add it as a new section in their open document.


Solution

  • Record the Alt + I, L command.

    If you had 2003 or earlier, you could have looked at the Insert menu (Alt + I) to learn that File is (L). Pity you have to use a ribbon.

    The recorder is Alt + T(ools), M(acros), R(ecord) and same keystrokes to stop.