Email Current Form with Command Button

A

Angela M

I have been working on a database for a while and the last detail I cannot
seem to get is a command button that I would like the users to be able to
click and it auto populate Oulook New Email with the current form as an
attachment in HTML format. I am not familiar much with VBA and have messed
around with it some to where it will send a form if I put the ID number in. I
want to be able to just send the current view of the form and not enter in an
ID number. Also I want it to automatically choose HTML format. This is the
coding I have, can you help? Thanks.

Private Sub SendForm_Click()
On Error GoTo Err_SendForm_Click

Dim stDocName As String

stDocName = "Suggestions Entry"
DoCmd.OpenReport stDocName, acPreview
DoCmd.SendObject acReport

Exit_SendForm_Click:
Exit Sub

Err_SendForm_Click:
MsgBox Err.Description
Resume Exit_SendForm_Click

End Sub
 
G

GBA

there may be a way - but there is no easy way to do this... which is
probably why you haven't received a response before now....

exporting the data is a conceptual alternative

putting it into a report - and then making it a Word doc is another thought...
 
M

Mark Andrews

You could take a look at our email module for HTML email templates that you
can trigger with a push of a button. It might work for you?

Not sure if you just wanted a nicely formatted HTML email with the
information on the current form or a regular text based email with an
attachment of some sort that shows the current form's info. Both are
possible but require a bit more work that 4 lines of VBA code.

http://www.rptsoftware.com

Mark Andrews
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top