The Document Creation Process Wizard

Start the document creation process wizard with button from Define group. The wizard lets the user determine settings

The Document Creation Process Wizard lets you add document creation processes to your database effortlessly. After completing the specification of the requirements the VBA code generator adds the implementation code to your Microsoft Access project.

The wizard leads you through a logical series of steps to set up the document template with bookmarks where to place the data, decide if you want to create the document for a single record or for a collection of document, if you want to have documents automatically saved, where and what document type and more.

To start the wizard, select the appropriate button in the Define group of the Document Creation tab in the Access ribbon.

Integration

The document creation process is straightforward VBA code. This allows you to change and extend the code as you wish, for example join several documents together in an zip file and have that automatically added to an email.

the document creation processes can be added to the application in many ways

Learn more

Select the Microsoft Access data source

The starting point for the making of a new document creation process is an ‘Access object’, a table, selection query or form, which displays a view on the data in the database. It is essentially the data of the active record that will be inserted in the document template.

When creating documents with many data elements you will probably start with an Access form which allows you to organize them in a convenient way using spatial grouping and maybe tab controls, giving the user a better experience.

Learn more

Microsoft Access data source
Choose which data source to use. A form is often best as it allows a better organization of the data, using tabs and sub forms.

Template Designer

After identifying the data source you will create the document template. For this a special tool named Template Designer is integrated with the wizard. Use the ‘Based on’ combo box to select a previously created template as the basis for a the new one. Alternatively, use the […] button next to it to select a template or document to start with – assuming you have one that is suitable.

The Template Designer opens when you press the Create button. In the designer you will drag and drop data bookmarks into appropriate positions. When you completed adding bookmarks and tables and saving the template info on what you used is communicated back to the wizard which will use it when creating the VBA procedure.

Now you can verify the filling the document by pressing the Preview button. If it is not yet to your liking you can Edit the template again.

Learn more

Give a name to the template and select a document to start from The template designer informs the wizard's code generator which fields are actually to be filled.

Single or multiple documents

A wizard session may result in producing up to three different document creation procedures if you decide to include each.

Specify whether you want the process to create a single document or documents for the selected, or for all records.

Learn more

Decide on how many records to create a document from

Process friendly name

Depending on your choice, the wizard proposes a procedure name and a friendly name for the process(es) you want to be have procedure code generated for.

When checked, on completion the wizard will also create a macro with the friendly name which can be used to start the document creation VBA procedure that is being created.

Learn more

name the procedure that implements the document creation process

Saving documents

When documents are generated on a regular basis, having a consistent approach to their naming and storing is very helpful if you later need to find them back. The wizard makes it easy to define such a strategy and, as the created code is VBA, you can further refine it if needed.

Even if you rely on a certain Office app, e.g. Word to create the documents, this does not mean you necessarily want the document stored in that format – in many cases you want Pdf. The wizard allows you to specify this, including the intricacies of having to handle the intermediate document (docx) involved.

Learn more

decide what policies to apply for saving the generated document

VBA code generator

The created process is in fully accessible VBA code which you can change as you like – code window in the image above. In the project window you see several additional supporting modules added.

generated vba code and added modules

Run the new document creation process

There now are several ways to start the process:

  • When in the VBE Editor you can put the cursor in the procedure and press F5.
  • If you indicated you wanted it to be added, you can run the Access macro from the Access navigation pane.
  • From the Document Creation tab on the Access ribbon, open the Create Documents dialog and start the new process from there.