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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send E-mail with attachment

Status
Not open for further replies.

BigLouie

Technical User
Dec 1, 2005
876
US
Using MS Access 2007. Have a form open with information. Also have an attachment field. Have a button setup that will send out a report based on the information on the form as a PDF attachment. In addition also need to have as an attachment to the e-mail the PDF that is an attachment to the record open on the form. Is that possible?
 
Is that possible?
Yes.

What have you tried so far?

Search this forum for email attachment for many instances. Come back wiith specific questions...

Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Well the code to send out an email with a report based on the record up on the form is no problem. And while I know how to add the .attachemnt.add "" I am unsure as to how to code in the information relative to the attachment to the form. In other words tell the code to use the value in the table in the field Attachment. If that is possible.
 
If I understand your question (and I'm not 100% certain that I do), simply use the pathname for your table attachment as the pathname for your .attachemnt.add

Code:
AttachmentPath = me.txtBoxAttachment.Value
Set objOutlookAttach = .Attachments.Add(AttachmentPath)

I'm assuming that you have the pathname to the pdf attachment available to your code.


Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top