Automatic saving of created documents - Save as

Inevitably, when you create a document there comes a point when you have to decide if you want to save it, and where, under what name and more. When creating documents in an automated way you have to think carefully what approach you want to follow.

Save created documents

Use Save As dialog

This option gives you the possibility to have a Save As dialog open directly on having generated the document – it uses the folder and file name – if set – as initial values but leaves the user the possibility to change those, or Cancel the save action if the document allowing the user first to decide if the document is worth saving.

Specify file type – Save as Pdf

A common requirement is to have a Word document saved in Pdf file format, but other formats are also supported.

Read more…

Specify folder

Assemble the VBA code for the location where the created document is to be stored. If the dynamically determined folder does not yet exist it will be automatically created using a helper procedure CreateFolder.

Read more…

Specify file name

The naming of the file is roughly the same as with folder. The helper function ControlValue has Format as argument allowing to present values like date in a suitable way.

Read more …

Overwrite existing file

When you uncheck this, you get an extra set of choices on how to handle the case where a file with the required folder and file name already exist.

Read more …

Close document after saving

Maybe you first want to review the document or else just have it closed out of the way.

Record new document in Documents table

This adds a record to the Documents table with normal properties such as author username, date created and a hyperlink to the document. This adds the required components such as the table if they are not already included.

Decide what to do when a document with same name and location already exists. Add suffix, have optional replace or use save as dialog