> How to Replace Text in a Word Document Using Open Xml
Problem: Most of the starters using Open XML starts by creating a Mail Merge alternative using Open XML SDK. A simple way to have some pre-defined text in the document/ template and replace it programmatically using the Open XML SDK. Solution: With a simple few lines of code one can use SDK to generate mail merged word documents from templates without having MS Office installed on the server. Also Microsoft strongly recommends using Open XML SDK over other methods for Server-side Office automation.