Convert Word to PDF
The action converts .docx attachments to .pdf format. Converted .docx files are removed from the Attachments menu and replaced by .pdf files.
Basic configuration
The Basic tab of the Properties panel contains settings shared by every action in an automation: the Active toggle, the Action type field, the Documentation field, the Use action template toggle (when enabled, the action takes its configuration from the selected action template defined in the process), the Execution condition section (determines whether the action always runs or only when a custom rule is met), and the Runtime error handling section (the message and numeric error code returned when the action fails to execute). Since these settings are not unique to the Convert Word to PDF action, they are described in detail in the Actions chapter.

Advanced configuration
The Advanced tab contains fields specific to this action, grouped into sections: Attachments to be processed and Output.

1. Attachments to be processed
This section lets you specify which .docx attachments of the workflow instance are converted. The Based on field determines how they are selected:
- Category - attachments are selected based on their assigned category.
- Regular expression - attachments are selected using a regular expression matched against the file name.
- Data source - attachments are selected using an SQL query that returns a list of identifiers.
For the Category mode, two additional fields are available:
- Category — the category of attachments to take into account:
- All - attachments belonging to any category are taken into account.
- Dynamic - once selected, the Dynamic expression field becomes available, where the category is built dynamically (using the rule editor) or entered manually, in the format
ID#Nameor justID. - None - attachments that don't belong to any category are taken into account.
- Select — which of the matching attachments will be converted:
- All attachments - all matching attachments will be converted.
- The oldest attachment - only the earliest added attachment will be converted.
- The newest attachment - only the most recently added attachment will be converted.
For the Regular expression mode, the Regular expression field is available, built manually or with the help of the rule editor:
- The simplest selection — only files with a given extension, e.g. ".docx":
- Expression:
.docx - Accepted:
Attachment1_File.docx - Not accepted:
Attachment1_File.pdf
- Expression:
- File names must start with an explicitly defined word (here: WEBCON), followed by
__or-, any number of alphanumeric characters, and end with the .docx extension:- Expression:
WEBCON(_|-)[a-zA-Z0-9]*\.docx$ - Accepted:
WEBCON_FileName007.docx,WEBCON-FileName007.docx - Not accepted:
WEBCON FileName With spaces.docx,SharePoint_FileName123.docx
- Expression:
- File names must start with a date in YYYY-MM-DD format, followed by
__or-, any number of alphanumeric characters, and end with the .docx extension:- Expression:
^\d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])(_|-).*\.docx$ - Accepted:
2015-07-09_FileName007.docx,2015-07-09-File123_New.docx - Not accepted:
2015/07/09-NotGonnaWork.docx,WEBCON_2015-07-09_File.docx
- Expression:
For the Data source mode, the SQL query field is available, where you provide a query that returns a list of attachment identifiers.
Select [ATT_ID] from [WFDataAttachmets] where [ATT_Name] = 'file.docx'
2. Output
This section lets you configure the parameters of the resulting .pdf files:
-
File name - the name of the resulting file, built dynamically with the rule editor. By default it matches the source file's name.
-
File description - the description of the resulting file, built dynamically with the rule editor. By default it matches the source file's description.
-
Category — the category the resulting file will be assigned to:
- The same category as source file - the resulting file is assigned to the same category as the source file.
- None - the resulting file is not assigned to any category.
- Dynamic - once selected, the Dynamic expression field becomes available, where the category is built dynamically (using the rule editor) or entered manually.
-
Overwrite attachment with the same name - if checked, a file with the same name is overwritten and its existing category is preserved — a new historical version of the file is created.
-
PDF/A files - if checked, the document is generated in the special PDF/A format, intended for long-term archival storage of documents, independent of the operating system and software used.
Detailed information on using this action can be found in the article Generating Word and conversion to PDF on the WEBCON technical blog.