--- title: "Set up document - Microsoft Word" slug: "set-up-document-microsoft-word" tags: ["Task topic"] updated: 2026-03-20T07:51:59Z published: 2026-03-20T17:44:08Z canonical: "docs.staedean.com/set-up-document-microsoft-word" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Set up document - Microsoft Word In Connectivity Studio, use a **Microsoft Word** document to write data to a Microsoft Word document (DOCX) using a Microsoft Word template (DOTX). With a **Microsoft Word** document, you can, for example, add data to text, include contract text, support multi-language output, or include product attributes or specifications. In this way, you can, for example, generate invoices or contracts with the style texts as defined in the template. To add data to the **Microsoft Word** document, you can add markers to the Microsoft Word template. You can add markers for document records and for document record fields. > [!NOTE] > **Note** > > You can use a **Microsoft Word** document only to write. So, no read options need to be set. ### Steps 1. Click **Connectivity studio - Integration Design**. 2. Click the **Documents** tab. 3. Click **New**. 4. Define a meaningful name for the document. **Example:** If the document is used for a sales integration, you can use names like 'Sales - Order' or 'Sales - Invoice'. In the **Document** field, type a value. > [!NOTE] > **Best practice** > > In the document name, do not use the: > > - Application name: Use the **Application** field to define the applicable application. > - Document type: Use the **Document type** field to define the applicable document type. 5. In the **Project** field, enter or select a value. 6. Define the applicable application for the document. For a **Microsoft Word** document, for example, select a 'Windows folder' or 'Files' application. In the **Application** field, enter or select a value. > [!NOTE] > **Note** > > You can only select an application that is defined for the applicable project. You can define project applications on the **Projects** page. 7. In the **Document types** field, select '**Microsoft Word**'. 8. Sub-task: Set properties. 1. Expand the **Properties** section. 2. You can process an external document in these ways: - **Direct**: You can use this to import or export (big sets of) simple data. For simple data, the document lines only have a root record. When a message is run, the data is directly mapped. More technically: It only loads the data in the memory of the record table (usually the **BisBufferTable**). As a result, the import or export of data is faster. - **Query**: You can use this to import or export complex data. For complex data, the document lines have several records and parent-child relations. When a message is run, the records are stored in the record table (usually the **BisBufferTable**) before the data is mapped. When the message run is finished, the records are deleted from the record table. In the **Process type** field, select an option. 3. To apply a predefined layout to your Microsoft Word files, define a Microsoft Word template file of type DOCX or DOTX to create a Microsoft Word file. On data export, based on this template, a file is created to which the data is exported. In the **Template filename** field, enter or select a value. 4. You can indicate the language of the document to be created. On write, the field labels for the defined language are used. This can be useful for language-specific documents. In the **Language field** field, enter or select a value. 9. Sub-task: Set custom handler. 1. Expand the **Custom** section. 2. For a **Microsoft Word** document, several standard handler classes are available. You can use a customized handler class. To do so, extend a standard handler class. In the **Handler** field, enter or select a value. 10. Sub-task: Set write options. 1. 1. Define the filename settings based on which filenames are created when exporting data to files. Expand the **Write** section. 2. Using a variable, you can add the value of two table fields to the filename. If you want to do so, define the applicable table. On write, this document is the target document. However, the file name is defined based on the root record values of the source document. So, make sure you select a table and table fields from the root record of the applicable source document. In the **Table name** field, enter or select a value. > [!NOTE] > **Note** > > You cannot use the table name itself as variable in the filename. 3. Define the first table field which value you want to add to the file name. The related variable is '**%5**'. In the **First field** field, enter or select a value. > [!NOTE] > **Note** > > You can only select a field from the defined table. 4. Define the second table field which value you want to add to the file name. The related variable is '**%6**'. In the **Second field** field, enter or select a value. > [!NOTE] > **Note** > > You can only select a field from the defined table. 5. To make the filename unique, you can add a unique number to the filename, provided by a number sequence. The related variable is '**%4**'. In the **Number sequence** field, enter or select a value. 6. Define the filename for the files that are created based on the document. You can use fixed values and variables. The available variables are: In the **Write filename** field, type a value. - **%1**: The name of the current document. - **%2**: The current date. - **%3**: The current time. - **%4**: The unique number as provided by the defined number sequence. - **%5**: The value of the defined **First field** - **%6**: The value of the defined **Second field** - **%7**: The ID of the current company. - **%8**: The ID of the current user. - **%9**: The file extension as defined by the applicable document type. For example: 'xml' or ‘json’. - **%10**: The UTC internet date/time (RFC3339 with underscores). Example: 2021-01-05T14_38_51Z 11. Sub-task: Set document properties. 1. You can set the Microsoft Word file properties in the document to make upload of a generated file to SharePoint easier. Expand the **Document properties** section. 2. If you have defined a template filename, you can read the properties from the template and upload these to the document. Click **Read properties**. 3. You can manually add properties that are used to set the Microsoft Word file properties on creation. Click **New**. 4. Enter the name of the property. In the **Name** field, type a value. 5. Indicate if the property is a standard Microsoft Word property (Core) or a customized property (Custom). In the **Type** field, select an option. 6. You can enter a fixed value for the property. In the **Value** field, type a value. 7. You can use a table field to define the property value on creation of the Microsoft Word file. You can only use a table field of the table as defined in the **Write** section, in the **Table name** field. In the **Field name** field, enter or select a value. 8. If you have defined a template filename, you can update the properties of the template based on the properties as defined for the document. Click **Write properties**. 12. Sub-task: Set conditional templates. 1. You can use conditional templates to help generate documents for different types or different languages. For example, if templates have contract disclaimers which can be language specific. Use a range to define the condition. Expand the **Conditional templates** section. 2. Click **New**. 3. Define the field based on which value a conditional template is applied. For example, a language field. In the **Field name** field, enter or select a value. > [!NOTE] > **Note** > > You can only use fields of the table as defined in the **Write** section, in the **Table name** field. 4. Define the field value based on which a conditional template is applied. 5. In the **Range** field, enter or select a value. 6. Define the Microsoft Word template file of type XLSX or XLTX that is applied for the defined condition. In the **Template filename** field, type a value. 13. Close the page. ## Related - [Customize document handler class](/customize-document-handler-class.md) - [Create separate files](/create-separate-files.md)