Email a form to an address that is in the form

Adriano85

Registered User.
Local time
Today, 11:54
Joined
Jan 16, 2013
Messages
16
Hi guys,

I have a form that shows first name, last name, email, date appointment, time appointment.

If I just select the regular email option (form attached as pdf) I have to type in the email address manually.

How can I make sure the form is attached as a pdf to my email and the email address that is on the form that I have open is automaticly put in the TO: field in my outlook?

Basicly I just want to use 2 mouseclicks: button on the form to create an email in outlook and click the send button in outlook.

Many thanks in advance!

Adrian
 
Hello Adrian, am sorry, am a bit confused here..

Do you have some code that you have implemented, which is not working
Or

Do you need a working code to send an email of the form with the email address of the current record?
 
I dont have a code yet. Im also not sure what would he the best option to realize this. In the macro you can select the receipents address so I did something like: [forms]![formname]![fieldname] but unfortunately that did not the job.
So Im looking for some ideas how to fix this and what expression to use. Thanks!
 
You could use either DoCmd.SendObject, which will be a one line Conversion of the Form to PDF and sending the same in an Email.. Or use DoCmd.OutputTo, to save the Form as a PDF and create an Oulook object to send the created PDF file.. to attach the email address simply use (with an Outlook object)..
Code:
.To = Me.[COLOR=Blue][B]controlThatHasEmailAddressOnForm[/B][/COLOR]
 
Great! Will play around with those.
Thanks for your help!
 
Eugin, this is a VBA code right? To be honest I have no experience with VBA so tried to put this code in VBA but constantly I received errors. (not very surprising)

I did build a button that did almost everything that I wanted exept the part of putting the email from the form into the TO: field in outlook.
Is there an access expression something like: [forms]![formname]![formfield] to realize this?
 
Did you try using the code in Post #4? Show me the code you have implemented so far..
 
Did you try using the code in Post #4? Show me the code you have implemented so far..


No I didn't yet because I have no idea where to start in VBA. I have been looking for more information about VBA but it didn't help me a lot yet.

But basicly this should be an easy macro to write if I had more knowledge correct?

Thanks.
 

Users who are viewing this thread

Back
Top Bottom