Emailing an Object from a form

L

Linda

Hi,

I am trying to email an object which is a refernce # from a form.
This is the code i am using:
Private Sub Command77_Click()
Dim refnum As Long
refnum = RPRTNUM
DoCmd.SendObject , "(e-mail address removed)", "The reference number is " &
refnum & "."
End Sub

When I click on Email Request button, the outlook email message window comes
up. I want to be able to just click the command button and email the the ref
# automatically without having to fill out an email message.

Thanks
Linda
 
D

Daniel Pineault

The basic synthax (taken from the help file) is

SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject,
MessageText, EditMessage, TemplateFile)

so, we can mod your code like

Dim refnum As Long
refnum = RPRTNUM
DoCmd.SendObject acSendNoObject ,,, "(e-mail address removed)",,,"E-mail
Subject", "The reference number is " & Refnum & ".",False
 
L

Linda

It worked, thank you for your help.

Daniel Pineault said:
The basic synthax (taken from the help file) is

SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject,
MessageText, EditMessage, TemplateFile)

so, we can mod your code like

Dim refnum As Long
refnum = RPRTNUM
DoCmd.SendObject acSendNoObject ,,, "(e-mail address removed)",,,"E-mail
Subject", "The reference number is " & Refnum & ".",False
--
Hope this helps,

Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.
 
M

Mike

Hi Daniel,
I've a similar post shown below (Sending email based on 2 combos) which
didn't get a respond. Would you pls take a look at it? TIA
Mike.

"Daniel Pineault" <[email protected]> escribió en el
mensaje de noticias
 

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