![]() |
#1
|
|||
|
|||
![]() I have a CSV file that tracks flu vaccines for employees. Each line of the CSV file has a corresponding pdf file that is documentation of the employee’s flu vaccine. The employee line in the CSV file includes their email address and the name of the pdf file. Is it possible to create a mail merge to automatically email the pdf file to employees? |
#2
|
||||
|
||||
![]()
It's certainly possible to write a VBA program that will do the job. If you go that route, Pecoflyer will probably suggest that you repost this question in the Excel Programming forum. But as for using mail-merge, I've never used it in Excel and only long ago in Word; I expect it can be done but I couldn't swear to it. Let's see whether anyone has more information, and after Thanksgiving if there are no responses we can talk about how to do it in VBA, if you want to.
|
#3
|
||||
|
||||
![]()
There's no need to write a macro - it's already been done! See: http://word.mvps.org/FAQs/MailMerge/...ttachments.htm
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
![]()
I agree with "macropod," there is, most likely, no need to write a VBA program. I say "most likely" because it is somewhat simple if you have Microsoft Office for Excel and Word! I have a set of instructions I wrote up at work I could forward to you IFF (if and only if) you have Word 2007 and Excel 2007, or possibly later.
To paraphrase - generate the script/verbiage/note you want to send in an email in Word. Every place you want a "variable" - e.g., a person's name, possibly their age, what department they work in, whatever, enclose that "variable name in brackets for ease of identification and location in your script. I also highlight in red so I can easily identify it both in the script and when emails are answsered, e.g., Dear [personsname]: you are receiving this email because your department [departmentname] has been selected to....... What you are doing is making "placeholders" in your verbiage, to hold the associated information that is located in Excel. In Excel you'll create a database with the variable you want in your email, e.g., personame and departmentname, along with the email address. Then you proceed to mail merge in Word and "connect" to your Excel file that has your specific information. I have been able to send out hundreds of emails in several seconds, about 30 seconds for 250 emails. The time involved is setting up the data and getting your script written the way you want. The actual mail merge itself only takes a few seconds to complete. This is my first post on here and have no clue if I can attach my instructions or copy and past them in a reply. If someone would let me know which is most appropriate, I'd be happy to help... Happy Holiday Season to All, Sgt Rock (Mort) Dallas, TX |
#5
|
||||
|
||||
![]()
Sgt Rock: Your repeated references to a 'script' suggest you don't understand that's just another way of describing a macro, which is a VBA program; either that or you've overlooked the core issue of how to attach a different PDF to each email.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
![]()
Thanks for your info. Personally, I have never, ever seen "script" used in place of macro. Point me to that please. My apologies if it caused confusion. So forget the word, "script" and in its place simply use the word "message"
If one is using Excel for the database, Word as the word processor, and Outlook as the email vehicle, then one need not do any VBA programming. Of course I guess it's possible to formulate a program to automate the process even more, and perhaps even more applicable if one is not using Outlook or Word? I've only done mail merge with the above. "In a nutshell," type your message in Word - insert "placeholders" where you want specific information, e.g., names, addresses, etc, Have those data in an Excel worksheet, preferably in the same sequence as they appear in your message, in addition to the individual email addresses that go with those data. While in Word, begin the "mail merge" process, accessing the Excel workbook with the data, finish the process by pointing Word to the email addresses in Excel. That's it, off to the races. Happy Holidays to All!! |
#7
|
||||
|
||||
![]() Quote:
The rest of your reply still doesn't address how to attach a PDF file to an email via a mailmerge. No-one is questioning whether you can create email messages via a mailmerge without a macro. But attaching a personalised file of any kind cannot be done via mailmerge field coding - a macro is required - which is why I pointed the OP to a ready-made solution.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
![]()
You are right - I totally missed the "attach a pdf file"
I must slow down and learn to read word for word what is in front of me. Thanks for pointing out and you are correct, attaching a personalized file is a totally different story Paul!! Best wishes for you and your family's holiday! Mort (Sgt Rock) |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel Mail merge | Joren | Word | 0 | 07-09-2013 07:38 AM |
Need Help w/Mail Merge - Multiple Lots & 1 Owner - Don't want to send Duplicates | dfwman | Mail Merge | 3 | 03-28-2013 07:11 PM |
![]() |
Claytocb | Excel Programming | 1 | 01-31-2013 11:58 PM |
Send e-mail message in Finish & Merge | CDTom | Mail Merge | 1 | 08-24-2012 12:52 AM |
![]() |
dipak.patel@i-link.co.in | Mail Merge | 1 | 01-06-2011 10:10 AM |