Skip to content

Merge to Word

Mail merge from an Excel table into a Word template — each data row → one Word file (or PDF).

Typical use cases: batch acceptance reports, contracts from a template, mass letters, payslips, certificates, etc.

Open the dialog

DVD Addin → group File and Print → click Merge to Word.

Workflow

Step 1 — Prepare the Word template

In a Word .docx file, place placeholders as {{ColumnName}}:

ACCEPTANCE REPORT

Item: {{Item}}
Code: {{Code}}
Date: {{Date}}
Party A: {{PartyA}}
Party B: {{PartyB}}

Quantity accepted: {{Quantity}} ({{Unit}})
Amount: {{Amount}} VND

The placeholder must match the Excel column name EXACTLY (case-sensitive, no spaces).

Step 2 — Prepare the Excel table

Row 1 = header (column names match Word placeholders). Each subsequent row = one Word output file.

ItemCodeDatePartyAPartyBQuantityUnitAmount
Pile foundationMC-0115/05/2026ABC CorpXYZ Co.250125,000,000
EarthworkDD-0116/05/2026ABC CorpXYZ Co.120036,000,000
........................

Step 3 — Configure the dialog

FieldDescription
Word template fileBrowse → pick the .docx containing placeholders.
Excel data rangeSelect the table (including header).
Output folderWhere to save generated Word/PDF files.
Filename patternPattern for filenames, using {{ColName}} (e.g. BB_{{Code}}_{{Date}}).
Output formatWord .docx or PDF (PDF requires Word installed).

Step 4 — Advanced options

  • Merge into a single file — combine all outputs into one Word/PDF with N sections (one per row).
  • Page break between records — insert page break between sections when merging.
  • Open first file when done — auto-open output to verify.

Step 5 — Click Merge

Excel status bar shows progress: DVD Addin: Merge 5/50 (MC-01)....

When complete, a popup shows:

  • Number of files generated.
  • Output folder.
  • Number of errors (if any).

Advanced placeholder syntax

Date format

{{Date|dd/MM/yyyy}} — format date by pattern.

Common patterns:

  • dd/MM/yyyy15/05/2026
  • dd-MM-yyyy15-05-2026
  • MMMM yyyyMay 2026
  • dddd dd/MMFriday 15/05

Number format

{{Amount|#,##0}}125,000,000{{Amount|#,##0.00 VND}}125,000,000.00 VND

Number-to-words

{{Amount|VND}}One hundred twenty-five million VND (Vietnamese localization helper).

Supports VND (VNĐ), USD.

Sample template

DVD Addin → group File and Print → menu Merge to WordSample Template.

Opens a sample template:

  • SendEmail.xlsx + SendEmail.docx — sample report sent via email.
  • FormNTCV.xlsx — Acceptance form (Excel-only, no Word merge).

TIP

You can download templates from Microsoft Office Templates or design your own. Just use {{...}} for placeholders.

Troubleshooting

Output file is empty / no content

  • Placeholder doesn't match column name (e.g. {{Item code}} but column is ItemCode — has space).
  • The Excel data range does NOT include the header.

"Word is not installed" when exporting PDF

PDF output uses Word COM to convert. Microsoft Word must be installed. If you only have LibreOffice/Google Docs → you can export .docx only, not PDF.

Output file won't open (format error)

  • Output quarantined by antivirus (check your security software).
  • Filename contains invalid characters → addin replaces them with _, but if the resulting name is too long (> 255 chars) it still fails.

Slow performance

  • Word COM is naturally slow (each file ~1-2 seconds).
  • Disable Open first file to avoid triggering Word UI each iteration.
  • Close any running Word instance before merging (avoid conflicts).

License gating

Merge to Word requires an active license (Activated or Trial).

Released under DVDAddin License.