Capturing email address from a sent report

  • Thread starter angelinarose via AccessMonster.com
  • Start date
A

angelinarose via AccessMonster.com

Hi all,
I was wondering if anyone had any solutions on how to you can capture an
email address from a report you send with outlook. I have a report that has a
macro that sends it to a single address. I want to capture who the report is
send to before it is sent. is there anyway to do this?
thank so much,
Angel
 
A

angelinarose via AccessMonster.com

Macro - send object Email message comes up with copy of report attached. As
it sends report I want it to capture the recipient's address. Or maybe is
there away to choose the address from a table with the address in it?
thanks in advance
Angel said:
How are you sending the report? Is it from Access? If so, where are you
getting the email address - grab it there?

Bonnie
http://www.dataplus-svc.com
Hi all,
I was wondering if anyone had any solutions on how to you can capture an
[quoted text clipped - 3 lines]
thank so much,
Angel
 
B

bhicks11 via AccessMonster.com

Hi Angelina,

So you must be manually entering the address? Yes, you can choose it from a
table.
Here's a copy of a little bit of code I use to send out a pdf I produce from
a form. As you can see, I have a form (ordersfrm) with a control called
EmailAdd with the Email address (bound to the table). I am using automation
with the SendMessage2 Function but you can use DoCmd.SendObject.

On Error GoTo Err_Command7_Click
Dim morder As String
Dim mestimate As String

mestimate = "C:\ABC\Estimate.pdf"
If IsNull(Forms!ordersfrm.EmailAdd) Then
MsgBox "There is no email address for this customer!"
Else
DoCmd.OpenReport "Estimate", acViewNormal
SendMessage2 True, mestimate
End If


Exit_Command7_Click:
Exit Sub

Err_Command7_Click:
If IsNull(Forms!ordersfrm.EmailAdd) Then
MsgBox "There is no email address for this customer!"
End If
'MsgBox Err.Description
Resume Exit_Command7_Click

Bonnie
http://www.dataplus-svc.com
Macro - send object Email message comes up with copy of report attached. As
it sends report I want it to capture the recipient's address. Or maybe is
there away to choose the address from a table with the address in it?
thanks in advance
Angel
How are you sending the report? Is it from Access? If so, where are you
getting the email address - grab it there?
[quoted text clipped - 7 lines]
 

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