Export data to Word

You can export data from your Microsoft Office Access 2007 database to a Microsoft Office Word 2007 document by using the Export Wizard. This article explains how to use the Export Wizard and how to save your export settings as a specification for later reuse.

In this article


Top of Page Top of Page

Exporting data to Word: the basics

You can export a table, query, form, or report to Office Word 2007. When you export an object by using the Export Wizard, Office Access 2007 creates a copy of the object's data in a Microsoft Word Rich Text Format file (*.rtf). For tables, queries, and forms, the visible fields and records appear as a table in the Word document. When you export a report, the wizard exports the report data and layout  — it tries to make the Word document resemble the report as closely as possible.

  • Start the operation from Access    To export data from Access to Word, you need to work in Access. There is no functionality in Word that can import data from an Access database. You also cannot save an Access database or table as a Word document by using the Save As command in Access.
  • Objects you can export    You can export a table, query, form, or report. You can also export only the records selected in a view. You cannot export macros and modules. When you export a form or datasheet that contains subforms or subdatasheets, only the main form or datasheet is exported. You need to repeat the export operation for each subform and subdatasheet that you want to view in Word. Conversely, when you you export a report, subforms and subreports that are included in the report are exported, along with the main report.
  • Outcome of the operation    The Export Wizard always exports formatted data. This means that only the fields and records that are visible in an object or view are exported along with the display format settings. Columns and records that are hidden, due to filter settings, are not exported. For a report, the layout of the report is also preserved when it is exported.
  • Merging with an existing document    When you export from Access to a Word document, the data is always exported into a new Word file. If you want the data to be inserted into an existing Word document, you must first export it from Access into a new Word document, and then copy the data from the new Word document and paste it into the existing document. Alternatively, you can copy rows directly from an Access table, query, form, or report, and then paste them into your existing document.

Top of Page Top of Page

Export data to Word

The process of exporting data to a Word document follows these broad steps:

  • Prepare your source data for the export. As part of this step, you make sure that your data does not contain errors, and you decide whether to export some or all of the data in your source table.
  • Run the Export Wizard.
  • Optionally save your settings as an export specification for later reuse.

The steps in the following sections explain how to perform each task.

Prepare for the export

  1. Open the source database.
  2. In the Navigation Pane, select the object that contains the data you want to export.

You can export a table, query, form, or report.

  1. Review the source data to ensure that it does not contain error indicators (green triangles) or error values, such as #Num.

Ensure that you have resolved any errors before you export the data to Word. Otherwise, you will find that such values are replaced with a null (Null: A value you can enter in a field or use in expressions or queries to indicate missing or unknown data. In Visual Basic, the Null keyword indicates a Null value. Some fields, such as primary key fields, can't contain a Null value.) value.

  1. If the destination Word document exists and is open, close it before you continue. The wizard prompts you before overwriting the document.

 Note   You cannot append data to an existing Word document.

  1. In the database, if you want to export only a portion of a table, query, or form, open the object and select just the records you want.

Export the data

  1. On the External Data tab, in the Export group, click Word. Button image

 Note   The Export commands are available only when a database is open.

  1. In the Export Wizard, specify the name of the destination file.
  2. The wizard always exports formatted data. If you want to view the Word document after the export operation is complete, select the Open the destination file after the export operation is complete check box.
  3. If you selected the records that you want to export before you started the export operation, you can select the Export only the selected records check box. However, if you want to export all the records in the view, leave the check box cleared.

 Note   This check box appears unavailable (dimmed) if no records are selected.

  1. Click OK.
  2. If the destination document exists, you are prompted to click Yes to overwrite the file. Click No to change the name of the destination file, and then click OK again.

Access exports the data and opens the destination document in Word, depending on the export options you specified in the wizard. Access also displays the status of the operation on the final page of the wizard. Go to the next steps if you want to save your import settings for later reuse.

Save the export settings

  1. On the last page of the Export Wizard, select the Save export steps check box.

A set of additional controls appears.

  1. In the Save as box, type a name for the export specification.
  2. Optionally, type a description in the Description box.
  3. Click Save Export.

-or-

To run the export operation at fixed intervals (such as weekly or monthly), select the Create Outlook Task check box and then click Save Export. Doing so creates a Microsoft Office Outlook 2007 task that lets you run the specification at a future date.

If you do not create the Outlook task, Access saves the specification. If you choose to create the Outlook task, Access displays the Export- - Task dialog box. Go to the next steps for information on using that dialog box.

 Note   If Outlook is not installed, Access displays an error message when you click Save Export. If Outlook is not configured properly, the Outlook Configuration Wizard starts. Follow the instructions in the wizard to configure Outlook.

Create an Outlook task

  1. In the Export- - Task dialog box in Outlook, review and modify the task settings, such as Due date and Reminder.

To make the task recur, click Recurrence. The following figure shows the task scheduler with some typical settings:

The Outlook task scheduler

For information about scheduling Outlook tasks, see the article Schedule an import or export operation.

  1. When you finish with the settings, click Save and Close.

Run a saved task

  1. In the Outlook Navigation Pane, click Tasks, and then double-click the task that you want to run.
  2. On the Task tab, in the Microsoft Office Access group, click Run Export Button image.
  3. Open the text file and verify the contents of the file.

See the next section for help with troubleshooting missing and incorrect values.

Top of Page Top of Page

Understand how Access exports objects to Word

The following table describes how Access exports various objects and values to Word. This can help you determine what is going wrong if the export operation is not working the way you expect.

Item Export considerations
Field names When you export a table, a query, or a form, the field names are placed in the first row of the table in the Word document. When you export a report, the placement of the field names in the Word document varies with the report layout.
Multivalued fields A field in Access that supports multiple values is exported to a single column in Word. The values are separated by commas (,).
Pictures, objects, and attachments All graphical elements — logos, data in OLE object fields, and attachments that are part of the source data  — are not exported.
Graphs Microsoft Graph objects are not exported.
Expressions Expressions are not exported to the Word document. Only the results of the expressions are exported.
Subforms and subdatasheets When you export a form or datasheet, only the main form or datasheet is exported. You must repeat the export operation for each subform and subdatasheet.

Top of Page Top of Page

 
 
Applies to:
Access 2007