I was wondering whether it's possible to create a data entry set from Microsoft Excel and export that directly into Microsoft Word?
For example, if I were making a phone book that lists the person's First Name, Last Name, address and phone number in Excel, this would automatically export the data to Word.
I'm not looking to have a set number of entries in Word and copy and paste, but rather as I add on more entries to Excel, the data is pushed from Excel into Word. I'm not an expert coder myself, but I've watched multiple videos on YouTube, and I am looking for guidance.
It's an old command that's no longer exposed in the Word UI by default:
InsertDatabase
. You'll find it in File/Options/Customize Ribbon or Quick Access Toolbar, under All Commands.This inserts a field with the name
Database
, via a set of dialog boxes.Get Data
is the same as what you see in mail merge when selecting the data source. This uses any valid connection method (these days, ODBC or OLE DB - the latter is the default) to bind to the data source. In your case, an Excel worksheet. If you've assigned a Range Name to the data, that is also available for selection.Data options
You can set Query Options (filter/sort what comes in). You can also set Table Auto Format to choose a pre-defined (or user-defined) Table Style.Insert Data
where the records can be selected. This is important: activate the checkboxInsert Data as field
. This is what will make the data dynamic.OK
to insert the data / field. The result will look something like the following, which you can see (and edit) by pressing Alt+F9 to toggle from field result to field code. This is the connection information.This field will not update automatically whenever anything in Excel changes, you have to force the update by clicking in it and pressing F9. Or you can use a macro to do so. Simplest, if you don't want to simply update all fields in the document body, would be to bookmark the table, plus a paragraph on each end and use