Re: How do I include an attachment to mail merged email?
- From: "Doug Robbins" <dkr@xxxxxxxxxxxxxx>
- Date: Sat, 3 Sep 2005 08:18:21 +0200
The code in the macro does rely on the catalog merge producing a table, so
as a minimum, in the maindocument for that merge, you need the mergefields
to be in the cells of a table.
The procedure should be able to be modified to do what you want.
In the catalog merge main document, you will need the field for the email
address and one from which the name of the file attachment can be derived
from the data in the city field such as
C:\Documents\<<city>>.doc
so that the cells in the corresponding column of the catalog merge document
contain the name of the file that is to be attached.
So for a record that has Houston as the city, that field would produce
C:\Documents\Houston.doc
If there was no entry in the city field, it would produce
C:\Document\.doc
If there was no email addresss for one of the records, there would be no
data in the email field of the catalog merge document for that record.
To get the emails only going out to people who have an email address, and
then only to people that have an entry in the city field, you will need to
introduce some If...then...Else constructions into the macro in the article
that checks for the length of the data returned by datarange variable that
is used to get firstly the email address of the addressee and subsequently,
the filename of the attachment.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"klam" <klam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3EB8FE16-CB2F-4C8B-BF99-7EEEA3EC4011@xxxxxxxxxxxxxxxx
> Hi Doug (and other Mail Merge knowledgeable folks!),
>
> I'm going to tag along on this thread as I have a similar problem. I read
> your article and though it is well written, for an unsophisticated user
> like
> me, it took me a while to get thru but I persisted and finally did
> it...wrong.
>
> I set up a test and made the catalog type file with my e-mail address and
> different file names on five separate lines. (However, my file was not in
> table format as your article shows but I was unsure if you were doing that
> for illustrative purposes only. My e-mail address was separated from the
> file name by a tab spacing, my e-mail address always started on a new
> line.
> If it is actually supposed to be in cells (table), how do you get it to do
> that? I would have thought it would do it on its own automatically.)
>
> My file looked like:
> me@xxxxxxxxxxx testfile1.pdf
> me@xxxxxxxxxxx testfile2.pdf
> .
> .
> .
>
> When I ran the macro, it gave me the Outlook warning message which I
> expected. I pressed YES six times, but when it kept on asking I pressed
> NO.
> I only had 5 test lines in file. In Word I could see Doc241 being
> created.
> Where was it getting all the e-mail addresses from? Worse yet, when I
> checked my Outlook, I received no messages from this!
>
> What I really want done is slightly different but I thought this would be
> a
> good base from which I could improvise. In case there's an easier way to
> go
> about it, here's what I'd really like to do:
>
> I have an Excel file that contains Names, E-mail, City column labels.
> There will be a Name in every cell under that column. Only some cells
> will
> have an e-mail, and only some cells will have City populated. The City
> will
> be limited to 6 choices.
>
> I would like to e-mail all the people with the same city the same
> attachment
> (i.e., the attachment is city-specific). I think the mail merge feature
> is
> needed but I'm not quite sure how.
>
> My workaround is to sort the list by city then e-mail address, make a new
> distribution list in Outlook for each of the 6 cities and cut and paste
> the
> respective e-mails into the different distribution lists, then e-mail the
> each distribution list its city-specific attachment. However, there are
> many
> names on the list so this could take quite a while.
>
> Using Word 2000 on XP
> thx for any suggestions.
>
> "Doug Robbins" wrote:
>
>> See the article "Mail Merge to E-mail with Attachments" at
>>
>> http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm
>>
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>> "Kathy" <Kathy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:5D4FEDA7-D5B9-42CA-A035-F84787216AAD@xxxxxxxxxxxxxxxx
>> >I have to send out over 100 emails each with a specific attachment. How
>> >can
>> >I
>> > do this through mail merge? The only difference to each email and
>> > attachment
>> > will be the addressee.
>>
>>
>>
.
- Follow-Ups:
- References:
- How do I include an attachment to mail merged email?
- From: Kathy
- Re: How do I include an attachment to mail merged email?
- From: Doug Robbins
- Re: How do I include an attachment to mail merged email?
- From: klam
- How do I include an attachment to mail merged email?
- Prev by Date: Re: How can I set up merge to only select certain records to include?
- Next by Date: Excel as mail merge source
- Previous by thread: Re: How do I include an attachment to mail merged email?
- Next by thread: Re: How do I include an attachment to mail merged email?
- Index(es):
Relevant Pages
|