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!

Populate any email client body with record field

Status
Not open for further replies.

johntology

Programmer
Apr 20, 2011
2
US
Hello,

I want a button onClick to grab the content of a populated field on my Access record and populate the body of an email client with it, including any hard returns or other formatting. I have tried this simple code:

Me.eSSS.SetFocus
Dim esssContent As String
esssContent = Me.eSSS.Text
Application.FollowHyperlink "mailto:?body=" & esssContent

But it only allows about 750 characters in the body, after which I get a runtime error. Could somebody let me know a more robust way to do this? Note, I want this to work on the user's default email client, whatever it may be.

Thanks.
 
Have you tried the DoCmd.SendObject method ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks, Yes, I did stumble on that later in the day:

DoCmd.SendObject , , , , , , "My Subject", esssContent, True


Much more robust, and it doesn't matter what the default email client is!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top