e-mail merge w/attachment 
Author Message
 e-mail merge w/attachment

Hi.  I am trying to create a VBA macro that will do an e-
mail merge from data in an Excel spreadsheet.  The body of
the message will need to contain the name and address of
the recipient from the data source.  All of the messages
will have the same document attached, which is where the
built-in e-mail merge function in Word seems to come up
short.  I am pretty new to VBA (as well as programming in
general), and so far I've been able to create a macro that
prompts the user for the message subject, and then sends
an identical message (using an Outlook mail template) to
all the e-mail addresses in the spreadsheet.  How can I go
about creating the message body with the information from
the spreadsheet.  Thanks in advance for any response (code
samples or links to code samples would be great!)

-Charles

ICQ#22027140



Sat, 17 Jan 2004 23:59:36 GMT  
 e-mail merge w/attachment
I'm a little confused. Are you trying to automate the Word mail merge? Or
are you trying to automate Outlook? If the latter, the message body is the
Body property or HTMLBody if you want to send in HTML format. Your code
needs to build a string that represents what you want to appear in the
message body, using Excel methods and properties like Range to extract the
data from the appropriate cells.

--

Sue Mosher, Outlook MVP
Author of
     Teach Yourself Microsoft Outlook 2000 Programming in 24 Hours
     Microsoft Outlook 2000 E-mail and Fax Guide
Outlook and Exchange solutions at http://www.slipstick.com


Quote:
> Hi.  I am trying to create a VBA macro that will do an e-
> mail merge from data in an Excel spreadsheet.  The body of
> the message will need to contain the name and address of
> the recipient from the data source.  All of the messages
> will have the same document attached, which is where the
> built-in e-mail merge function in Word seems to come up
> short.  I am pretty new to VBA (as well as programming in
> general), and so far I've been able to create a macro that
> prompts the user for the message subject, and then sends
> an identical message (using an Outlook mail template) to
> all the e-mail addresses in the spreadsheet.  How can I go
> about creating the message body with the information from
> the spreadsheet.  Thanks in advance for any response (code
> samples or links to code samples would be great!)

> -Charles

> ICQ#22027140



Tue, 27 Jan 2004 20:31:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Mail merge with attachment

2. Word Mail merge to Outlook Email with PDF Attachment

3. Attachments for e-mail in mail merge

4. Mail Merge BarCodes / Mail Merge Insertion Point

5. mail merge to email

6. Mail Merge to Email

7. Formatting Merge Fields in Word Mail Merge

8. Word Mail Merge Err - Word could not merge...

9. Sending Email with Default Email Software WITH Attachment

10. Help sending HTML mail in mail merge

11. HTML forms, Word, e-mail and mail merge

12. creating word mailing labels with Mail Merge

 

 
Powered by phpBB® Forum Software