Filling a Word MergeField from a DataTable in VB.net
I have created a small web app that presents as a form with a few text boxes and lots of check boxes. The user fills out the form and saves the data to a SQL database. The user can then search for a record and the app displays a filled out form. This all is working as expected using 2 DataTables, dtForm contains a single row with items such as the form date and the ID of the record. The second DataTable contains multiple rows with all the checkbox data. The final requirement is printing out a completed form. I have created a Word template (.dotx) that looks just like the online form. I am having difficulty finding examples / syntax for taking data from the DataTable and merging it into the Word document. Looking for help taking row.Item(“FORM_DATE”) from the first DataTable and merging it into a Word MergeField named FormDate.
Getting RPC_E_DISCONNECTED exception while trying to automate Word Doc
I am trying to combine few word docs and create one final doc using VB.NET as a part of windows application. The word document is getting disconnected from RPC while trying to edit the final resulting document.
Here is a code sample showing what I am trying to do,