Convert Word Document
The Convert Word Document action converts a Word document (.doc, .docx) to another format and returns the resulting file content.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Document | File content | Yes | Word document content (e.g. output of a Get file content action from SharePoint). |
| Output Format | String | Yes | Desired target format. One of: .doc, .docx, .pdf, .html, .html Fixed, .svg, .jpeg, .png, .bmp, .gif, .tiff. |
| Mail merge first data source | Boolean | No | Process Word mail merge fields using the data from the first data source (list or item). |
| Data source – Name | String | No | Identifier for referencing this data in the template. |
| Data source – Data | Object / List | No | Item or list of items provided by another action. |
| Data source – Format | Enum / String | No | Format of the supplied data. One of: CSV, JSON, XML. |
Optional Parameters per Output Format
Doc
| Parameter | Type | Description | Options |
|---|---|---|---|
| Use Anti‑aliasing | Boolean | Apply anti‑aliasing | Yes, No |
| Use High Quality Rendering | Boolean | Use high‑quality rendering | Yes, No |
Docx
| Parameter | Type | Description | Options |
|---|---|---|---|
| Use Anti‑aliasing | Boolean | Apply anti‑aliasing | Yes, No |
| Use High Quality Rendering | Boolean | Use high‑quality rendering | Yes, No |
HTML
| Parameter | Type | Description | Options |
|---|---|---|---|
| Allow Negative Indent | Boolean | Permit negative indentation values | Yes, No |
| Export Headers Footers Mode | Enum | Header/footer export strategy | FirstPageHeaderFooterPerSection, FirstSectionHeaderLastSectionFooter, none, PerSection |
| Export Page Margins | Boolean | Include page margin settings in the export | Yes, No |
| Export Page Setup | Boolean | Include page setup details (size, orientation) | Yes, No |
| Export Relative Font Size | Boolean | Scale fonts relative to the original document settings | Yes, No |
| Document Split Heading Level | Integer | Maximum heading level at which to split the document (default: 2) | Any integer |
| Image Resolution | Integer | Output resolution for embedded images | Any integer (dpi) |
| Use Anti‑aliasing | Boolean | Apply anti‑aliasing | Yes, No |
| Use High Quality Rendering | Boolean | Use high‑quality rendering | Yes, No |
| Parameter | Type | Description | Options |
|---|---|---|---|
| Page Mode | Enum | Initial PDF display mode | useOutlines, FullScreen, useAttachments, UseNone, UseOC, UseThumbs |
| Image Compression | Enum | Compression algorithm for images | Auth, Jpeg |
| Compliance | Enum | PDF standard conformance level | Pdf17, Pdf20, PdfA1a, PdfA1b, PdfA2a, PdfA2u, PdfA4, PdfA4Ua2, PdfUa1, PdfUa2 |
| Use Anti‑aliasing | Boolean | Apply anti‑aliasing | Yes, No |
| Use High Quality Rendering | Boolean | Use high‑quality rendering | Yes, No |
Returns
| Name | Type | Description |
|---|---|---|
| File content | String (base64‑encoded) | Base64‑encoded bytes of the converted file, suitable for downstream actions. |
Examples
Name: <<[Person.FirstName]>> <<[Person.LastName]>>Address:<<[Person.Address.Number]>>, <<[Person.Address.Street]>><<[Person.Address.City]>><<[Person.Address.Postcode]>>{ "Person": { "Title": "Mr", "FirstName": "John", "LastName": "Smith", "Address": { "Number": "5", "Street": "Saffron Road", "City": "Leicester", "Postcode": "LE18" } }}Name: John SmithAddress:5, Saffron RoadLeicesterLE18Troubleshooting
Click to expand common errors and fixes
Document Missing, Truncated or Invalid
Cause:
Document input is empty, corrupted, or not valid Word bytes.
Fix:
- Ensure the Document payload contains the complete
.doc/.docxbinary. - Verify the file opens locally to confirm it is not corrupted.
Unsupported or Misspelt Output Format
Cause:
Output Format value is incorrect (typo or unsupported).
Fix:
- Confirm the format exactly matches a supported value (case-sensitive).
- Correct any typos.
Password-Protected or Restricted Document
Cause:
The Word file is encrypted or protected for editing.
Fix:
- Provide an unprotected copy or remove restrictions before conversion.
Mail Merge / Data Binding Failures
Cause:
Mail merge enabled but no data provided, or data source name/structure does not match template placeholders.
Fix:
- Ensure Mail merge first data source is set only when a valid first data source exists.
- Verify data source names exactly match template identifiers and data structure aligns with placeholders.
Template Placeholders Unresolved or Blank Output
Cause:
Template expressions reference missing or incorrectly named data keys, or data format mismatch (CSV vs JSON vs XML).
Fix:
- Confirm data source keys and paths match template placeholders (case-sensitive).
- Verify the declared Data source - Format matches the actual payload and the payload is well-formed.
Layout, Pagination or Formatting Differences in Output
Cause:
Target format handles layout differently (reflow, CSS/HTML differences, image scaling).
Fix:
- Use format-specific options (e.g., html Fixed, anti-aliasing, high-quality rendering) to control output fidelity.
- Test with representative samples and adjust page/margin/options to tune results.
Images or Embedded Objects Missing or Low Quality
Cause:
Embedded items not preserved or resolution/compression options too low.
Fix:
- Enable higher image resolution or high-quality rendering options.
- Verify embedded objects are supported by the chosen output format.
Headers/Footers, Tracked Changes or Fields Not Preserved
Cause:
Export options or target format do not preserve certain Word features (tracked changes, dynamic fields).
Fix:
- Choose an output format that preserves the required features (e.g., PDF with appropriate settings).
- Enable relevant options if available.
- If tracked changes must be visible, ensure they are present in the source and that revision metadata is retained.
Invalid Format-Specific Option Values
Cause:
Numeric ranges exceeded, invalid enum values, or conflicting options.
Fix:
- Validate option names, enum values and numeric ranges against the documented set for the selected format.
- Remove or correct invalid/conflicting options.
Output Corrupted, Truncated or Fails to Open
Cause:
Returned payload truncated, incorrectly encoded, or mismatched to expected type.
Fix:
- Verify the returned base64 string is complete and decodes successfully.
- Reproduce with a minimal Word file to check for consistent truncation.
Performance, Timeouts or Resource Limits on Large Documents
Cause:
Very large documents, many high-resolution images, or complex templates exceed processing limits.
Fix:
- Reduce file size (compress/resize images).
- Break the document into sections.
- Lower image resolution for conversion.
- Test with representative samples.
Character Encoding or Special Character Corruption
Cause:
Encoding mismatches or unsupported characters in data sources or document.
Fix:
- Ensure inputs use UTF-8.
- Confirm template and data sources include correct encoding.
- Test with special characters.
Generic Runtime or Transient Failure
Cause:
Malformed inputs, intermittent conversion engine error, or unexpected internal state.
Fix:
- Reproduce the issue with a minimal document and minimal option set.
- Validate all inputs and retry to rule out transient failures.
Quick Checklist
- Document is the complete
.doc/.docxbinary/base64 (not a path/URL). - Output Format is exactly one of the supported values and spelt correctly.
- If using mail merge, ensure Mail merge first data source is appropriate and the data source is present.
- Data source Name values match template identifiers exactly (case-sensitive) and Data structure matches placeholders.
- Data source - Format correctly reflects the payload type (CSV / JSON / XML).
- Tune format-specific options (anti-aliasing, high quality, page mode, image resolution) to meet fidelity requirements.
- Test conversion with a small representative document before full-scale runs.
- If output is invalid, reproduce with a minimal redacted document plus the exact Output Format, mail merge flag, data source names/formats, and format options - that input set is required to isolate the cause.