|
-
January 3rd, 2013, 09:54 AM
#7
Re: Attaching Sub Form to SMTP Message
I figured out a solution. When the user clicks the button to send the e-mail, the subform is automatically exported and later attached to the e-mail message in the "With msg" loop. It works like a charm 
Thanks for y'all's help!
P.S.
When sending attachments using an SMTP server (CDO e-mail), you have to use .AddAttachment (FileName) INSTEAD of .Attachments.Add (FileName).
.Attachments.Add is used for Outlook messages. I found this out the hard way (many many hours of forum surfing, and reading up on VBA language specifications), so I'll pass this knowledge on to anyone who might be experiencing a similar problem in hopes to save them some valuable time.
Last edited by Chad Jackson; January 3rd, 2013 at 09:56 AM.
Reason: Typo
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|