Merge excel data into a word merge file
Posted on 2014-04-23
I have an excel spreadsheet with column headings and a list of names. there is a column that the user will put a 'X' in if they want to print a letter to this person. So I would like to add a button to spreadsheet that will go through and get the records that have an 'X' and merge those records to a Word Merge File to create a new Word Document.
I know how to get the data, my question is how can use the recordset or table created in excel vba and with vba open the merge document, merge the recordset and save a to a new word file, all being automated.
When I create the merge file in word and define the fields, how do I set that up when the table or recordset isnt built yet and wont be until program execution.
thanks in advnace for the help.