Skip Ribbon Commands
Skip to main content
SharePoint

Manually Determine which Word Fields to Populate with Values

To manually determine which Word fields to populate with data item values, expression results, and literal values, complete the following steps:
  1. Check out and open the process you want to edit.

  2. In the Toolbox pane, click Microsoft Office. A list of activities is displayed.

  3. Double-click or drag the Write Word Document activity into the process.

  4. Link the activity with other activities in the process. 

  5. Right-click the Write Word Document activity. A shortcut menu is displayed.

  6. Select View Properties. The Write Word Document window is displayed.

  7. Click the Input File or Template Location tab. The corresponding screen is displayed.

  8. In the Input File Location field, select the input field editor and set the field to a value that is a location where the Word document is stored.

    Note:
    If your system resource contains a data item in the connection string property, click Configuration values and enter a valid connection string for design-time, configuration purposes.


  9. In the Authentication section, select Run as BPM Server or Specify credentials.

    Note:
     If you select Run as BPM Server, access will be granted or rejected based on the BPM Server credentials. If you select Specify credentials, complete the Username, Password, and Include domain fields using the appropriate input field editors. The Include domain check box is optional.


  10. Click the Data Mappings tab. The corresponding screen is displayed.

  11. Select the Manually Map Data Items to Document Fields check box.

  12. In the Value to Write field, select the input field editor and set the field to a value that you want to write to the Word fields.

  13. In the Field to populate field, select the input field editor and set the field to a value that is a Word field.

    Note:
    You can map more fields with data items by clicking the plus sign (+). Use the minus sign (−) to remove a mapping.


  14. Click the Output Destination tab. The corresponding screen is displayed.

  15. In the Output File Name field, select the input field editor and enter the name you want the file to have.
     
    Note:
    You do not have to specify a file extension. The file extension from the input file will be used.
     
    If the Ouput File Name's file extension is not the same as the input, then the activity will save the file using the Output File Name's extension. This feature allows you to convert a .docx file to a .doc or .doc to .docx file. Additionally, you can use it to convert a .dot (or .dotx) to a .doc or .docx file.

     
  16. From the If the file already exists section, select Overwrite the file or Increment the file name.

    Note:
    Select Overwrite the file to replace the existing file. Select Increment the file name to append a _1, for example, to the file name the first time the process runs and sees that a file already exists. The number will increment each time the process runs and finds a file with the same name.
     
     
  17. In the Output File Location field, select the input field editor and set the field to a value that is a file location where you want to store the Word file.

  18. In the Authentication section, select Run as BPM Server or Specify credentials.

    Note:
    If you select Run as BPM Server, access will be granted or rejected based on the BPM Server credentials. If you select Specify credentials, complete the Username, Password, and Include domain fields using the appropriate input field editors. The Include domain check box is optional.
      
  19. Click OK. You configured the activity to allow the Process Engine to automatically populate Word fields.
Related Topics
Find and Replace Data Item Tokens in a Word Document
Set the Properties of a Word Document when Creating or Updating the Document
Automatically Populate Word Fields with Data Item Values

Source
BPM Designer Topics > Overview of Activities and Activity Topics > Microsoft Office Activities > Write Word Document
Last modified at 7/31/2020 11:42 AM