Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA to include BCC in Word mailmerge to email

Status
Not open for further replies.

merlizbet

Technical User
Oct 4, 2012
36
US
I have an Access datasource that I'm merging into a Word document to be emailed. I need to include a BCC in each email. Web searches return a variety of code, but none of it seems to be doing exactly this. I was able to BCC myself, but the email it sent me didn't contain the Word merge document (and it didn't send an original email to any of the addresses in the datasource).

If anyone has done this very thing, I would *really* appreciate you sharing your VBA! In the meantime, I will continue web searching.

Thanks!
 
Word's object model doesn't include the CC or BCC methods. To do that, you'd need to automate Outlook and use its CC and BCC methods directly.

Cheers
Paul Edstein
[MS MVP - Word]
 
Thanks, Paul. Yes, I'm clear that Word itself doesn't provide a method to include CC or BCC. I have found other people's VBA that involves both Word and Outlook, but I haven't found *exactly* this scenario. I'm a functional person who is pretty OK with VBA in Access, but do basically nothing with VBA in the other MS products; so I'm struggling with the code to combine the 2 applications (with my datasource being an Access query, so technically 3 products) is not moving along quickly. I **might** be able to eventually figure this out with the help of Mr. Google, but we really need this feature *today*.
 

This works just fine for me within a Word project.

Code:
Set myolapp = CreateObject("Outlook.Application")
Set MailItem1 = myolapp.CreateItem(0) 

MailItem1.CC = "Person@domain.com"

I'd guess .BCC would work too.
 
Thanks. I'll see if I can figure out how to work that into the other code I found. If not, I'll be back. [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top