![]() |
Starting Word from Excel
I am trying to write CSV to a temp file from Excel, then start a Word
document with the mail merge template and connect it to the CSV and do a "Merge to New Document" using an Excel Macro. Wondering how to do this and will this work in Windows (Office 2003 and 2007) and MAC? My data is arranged in columns because I will potentially have 256 fields (but only one record). Col A is the field headers and Col B the values. Thanks, Andy |
Starting Word from Excel
Here is how you start word from excel
sub startwrd Dim wrd As Object Set wrd = CreateObject("Word.Application") wrd.Visible = True end sub |
Starting Word from Excel
That's a good start. Now how do I specify what file Word should open and
what file it should connect to for Mail Merge, and actually do the merge? I'm thinking that I will have to have a macro on the Word side that does the connection and merge. So what remains is how to pass WOrd the name of the mail merge template to open, the name of the CSV file to connect to and the name of the final file to save thhe merge to. Any ideas? -- Thanks, Andy "GTVT06" wrote: Here is how you start word from excel sub startwrd Dim wrd As Object Set wrd = CreateObject("Word.Application") wrd.Visible = True end sub |
All times are GMT +1. The time now is 06:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com