View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Automating mail merge from excel

I don't quite follow why you need to automate Word's mail merge from Excel,
or rather which aspect(s) of the entire process need(s) to be automated.

I can see perhaps you might want to automate the creation of your Mail Merge
data in Excel. Filter your data as required, copy it to a dedicated sheet
(in same or another file). Alternatively to a Named range. Ensure the top
row is headers and there are no entirely blank rows. All this process might
be pretty straightforward, manually or programmatically. Don't forget Word
also has the ability to filter data, in a similar way to Excels Data/filter,
depends on what you need.

In Word, Tools / Letters & mailings / Mail merge, follow the wizard. In step
3 browse to your Excel file, and again follow the Wizard. When almost done
don't preview but save the doc as a Template.

Of course there's a bit more to it, no doubt the entire process can be
automated from either Excel or Word but would need to know more details (I'm
not a mail merge expert!).

Regards,
Peter T



"Cheese_whiz" wrote in message
...
Hi all,

I'm mostly an access guy, so I'm not unfamiliar with vba (access vba,
anyway)...

I think I need to automate a word mail merge from Excel. What I need to
do
is check (or filter) a list in version 2003 for no entries in a date
column.
For those records that have no entries in the date column, I need to merge
those into a word document and then add today's date (Date()) as the
column
value to those records. I want to print the word document, but most
likely
I'd be just as happy if not more happy to do that manually once the merge
has
been completed.

Does that sound like working from excel is the way to go, maybe utilizing
an
already setup mail merge file in word? Could I (in vba) filter the
records,
run the merge, and then append the date values from within excel? Can
anyone
point me to some code to start me out?

Any direction would be greatly appreciated. I've automated exel and word
from access, but never word from excel, and I'm not even sure what I'm
asking
is feasible.

Thanks,
CW