Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Generate Email

0 views
Skip to first unread message

James Mullan

unread,
Nov 15, 2007, 6:46:01 AM11/15/07
to
Hi

Can anyone advise how I can generate an email from access? I want the user
to be able to click a button which will open an email template in outlook and
populate with data from specified tables and columns.

Thanks

James

Alex Dybenko

unread,
Nov 15, 2007, 6:56:13 AM11/15/07
to
Hi,
have a look at docmd.sendobject

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

"James Mullan" <James...@discussions.microsoft.com> wrote in message
news:A8A531D5-41B3-4ECC...@microsoft.com...

James Mullan

unread,
Nov 15, 2007, 8:53:01 AM11/15/07
to
Thanks Alex, I've got the basics of this sorted. Do you know how I could call
the the contents of a field in the current record and place them in the 'To'
field of the message?

Thanks

James

Alex Dybenko

unread,
Nov 15, 2007, 11:07:10 AM11/15/07
to
Hi,
say you have a textbox txtTo, then code behind button's click event on there
same form will be:

docmd.sendobject acSendTable,"MyTable",,me.txtTo


--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

"James Mullan" <James...@discussions.microsoft.com> wrote in message

news:117C5328-3AE1-43B3...@microsoft.com...

James Mullan

unread,
Nov 19, 2007, 7:28:01 AM11/19/07
to
brilliant - thanks Alex

another q... (and don't know if this is possible)

within the text string of the message section, is it possible to insert
items in a similar way?

thanks

Alex Dybenko

unread,
Nov 19, 2007, 7:36:21 AM11/19/07
to
Hi,

you can add it as body parameter. Also you can send table as text like here:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com


"James Mullan" <James...@discussions.microsoft.com> wrote in message

news:AE7B786B-B9F5-4E98...@microsoft.com...

James Mullan

unread,
Nov 19, 2007, 7:43:03 AM11/19/07
to
thanks Alex - I'm still a little new to VBA - could you explain how I would
do this? what syntax I would use etc? would I set this up within the text
string of the message body?

Alex Dybenko

unread,
Nov 19, 2007, 9:03:03 AM11/19/07
to
just the same way you do with subject:

docmd.sendobject acSendTable,"MyTable",,me.txtTo, me.txtBodyText

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com


"James Mullan" <James...@discussions.microsoft.com> wrote in message

news:202DAD7B-A26B-445D...@microsoft.com...

0 new messages