mechzombie
New Member
- Joined
- Aug 10, 2017
- Messages
- 2
Hi, as the title suggest I am trying to populate a word template from a userform in Excel.
I have created 3 worksheets in excel (CustomerDetails, OrderBrief, OrderDetails) and a Userform with a listbox and a command button.
Listbox is populated with a Named Range consisting of Customer Names, and Command Button is to Generate Invoice by populating detail in the Word template and saving as another file.
Word Template (Invoice.docx) comprises of Labels and a Table. Table basically has 4 columns (Serial No., Item No., Quantity, Total Cost), rows are variable and will keep increasing.
I am able to populate the Label part easily but I have no idea how to populate the table. I have tried looking around the web and didn't find anything understandable.
Would love any help on this, I am a mechanical engineer and runs a small machine shop with zero idea about VBA. So far I was able to create this after going through various tutorials and examples. The idea of this to help me document my Client details, order details etc in an Excel Sheet and be able to generate a bill by filling a word template.
Below are the links to the required documents.
Link to Excel File: Trial1.xlsm - Google Drive
Llink to Word Template: Invoice.docx - Google Drive
I have created 3 worksheets in excel (CustomerDetails, OrderBrief, OrderDetails) and a Userform with a listbox and a command button.
Listbox is populated with a Named Range consisting of Customer Names, and Command Button is to Generate Invoice by populating detail in the Word template and saving as another file.
Word Template (Invoice.docx) comprises of Labels and a Table. Table basically has 4 columns (Serial No., Item No., Quantity, Total Cost), rows are variable and will keep increasing.
I am able to populate the Label part easily but I have no idea how to populate the table. I have tried looking around the web and didn't find anything understandable.
Would love any help on this, I am a mechanical engineer and runs a small machine shop with zero idea about VBA. So far I was able to create this after going through various tutorials and examples. The idea of this to help me document my Client details, order details etc in an Excel Sheet and be able to generate a bill by filling a word template.
Below are the links to the required documents.
Link to Excel File: Trial1.xlsm - Google Drive
Llink to Word Template: Invoice.docx - Google Drive