Avatar of urjudo
urjudo
Flag for United States of America asked on

email documents from Access database

Hi Experts,
I have a question, is possible send document(s) from access database?  (instead of sending out hard copies of document, would like to learn how to set this up in the database, never done this before). if yes, how? do you have a sample I have look at it?  

Thanks,
Microsoft Access

Avatar of undefined
Last Comment
Helen Feddema

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Helen Feddema

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
urjudo

ASKER
so we have to save as PDF first and can not be run the run the report or document(s) as a preview in the database and send it out?  here are some questions:
1).  I have to create a special form that have user(s) own email address as default?
2). one they click a button "send email" then open the outlook or the email address sill in the database?
3). can it be attach the document(s) with out save as PDF and just attach as preview in the database.

preferred if there is a sample I can view.

Thanks
urjudo

ASKER
I meant sample Access database that has this function if possible.

Thanks
Helen Feddema

My code sample uses a recordset of the recipients, with their email addresses.  You can also send an email (with a PDF attachment) to an email from the current record on a form.  You do have to save the report as a PDF file in order to attach it -- when you preview the report, that lets you look at it in Access, but no file is saved, so there is nothing to attach to the email.  Here is a sample database for you to examine.
SendPDFs.accdb
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
urjudo

ASKER
so I can create a button on the form, where I can call the function on the button?

Thanks
urjudo

ASKER
"You can also send an email (with a PDF attachment) to an email from the current record on a form."
no sure how this works.
Helen Feddema

To send a PDF (based on a filtered report) from the current record on a form, you would pick up the filter value (CustomerID or whatever) from the current record, and use it to create the filtered report.  This is what is done in a loop in my sample code.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.