How Can I Put an Image in a Microsoft Word or PDF File?
To put an image in a Microsoft Word or PDF file with the Microsoft Word activity, do the procedure in this topic.
Examples
- (Example) Create a Word Document and PDF File with Data from an App
- Examples - Step-by-step use case examples, information about what types of examples are provided in the AgilePoint NX Product Documentation, and other resources where you can find more examples.
Prerequisites
- AgilePoint NX OnPremises or AgilePoint NX Private Cloud.
- Your image must be stored on the AgilePoint Server machine.
- An access token for your
source and target
data source to store
the Microsoft Word template file and the output Word or PDF file.
For more information, refer to Access Tokens.
- A Microsoft Word template file with the .dot or .dotx file name extension.
- A Mail Merge field in your Word template file with the syntax image:[FieldName]
Example:
image:logo
Good to Know
- In most text fields, you can use process data variables as an alternative to literal data values.
- To create a Word template, refer to the online help for Word templates, Mail Merge fields, and bookmark fields in Microsoft Word
How to Start
- On the App Explorer screen, do one of these:
- Do one of these:
- Complete the fields on the General Configuration screen.
- Click Source Configuration .
- On the Source Repository screen, select the source location of your Microsoft Word template file.
- Click Target Configuration .
- On the Target Repository screen, select the target location for your output Microsoft Word file.
- Click Microsoft Word Configuration .
- On the Microsoft Word Configuration screen, in the Word Template Name field, shows the name of the Word template file that is selected in the source repository.
- In the Destination File Name field, enter the file name of the output file.
You can use Process Data screen to specify a process data variable.
Procedure
- To connect the process value to the Microsoft Word fields, do one of these:
- Click Basic Mapping.
A warning message shows that you will lose all the mappings in Advanced Mapping.
- To show your image Mail Merge fields (for example, image:logo), click Click to Load Word Fields.
- Drag and drop the image Mail Merge field to the Word Field list.
- In the Process Value column, enter the absolute path of your image on the AgilePoint Server machine.
You can use Process Data screen to specify a process data variable.
- Click Advanced Mapping.
A warning message shows that you will lose all the mappings in Basic Mapping.
- Click the Schema Mapping button to open the Schema Mapper.
- Connect an element in your process schema to an image Mail Merge field from Microsoft Word—for example, image:logo.
- Click Basic Mapping.
- (Optional) Click Save as PDF to save the file in .pdf format.