I'm doing a project in VB. I have some textboxes in my VB user interface. Whenever the user enter value in those boxes and submit, i wan't to generate a Microsoft Word document with the values entered, incorporated with a template previously defined.
A standard template for the word is present. Only some fields in the template needs to be changed every time. These values will be supplied by the user through the interface. Finally when all the changes are made, the word document should be made with all those values.
Could anybody provide me a solution for this?
Thanks in advance
The following code sample demonstrates how to open existing word template, insert a 3 x 5 table and fill it with specific data, finally save it.
You need to Add Reference COM component: Microsoft Word Object Library to your project.
The followng table content will be inserted this Word template file:
How to Use Automation to Find a Location in a Word Document
Most common tasks are performed in Word Automation
How to automate Word from Visual Basic .NET to create a new document
How to insert table and fill it with specific data using Word Automation
- Marked as answer by Martin Xie - MSFT Thursday, July 17, 2008 4:43 AM