Starting Word from Excel

A

AndyC812

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
 
G

GTVT06

Here is how you start word from excel

sub startwrd
Dim wrd As Object
Set wrd = CreateObject("Word.Application")
wrd.Visible = True
end sub
 
A

AndyC812

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top