SendObject problem

  • Thread starter Thread starter Cadburys
  • Start date Start date
C

Cadburys

Hi

I have a button on my form which attaches a report in pdf format to an email
.. The problem is that the email address is coming up incorrectly in Outlook
and says that it does not recognise the address.

My code is as follows:

DoCmd.SendObject acSendReport, "Confirmed", , [EmailAddress], , ,
"Booking Confirmation"

The [EmailAddress] refers to my email address field on the form which might
be (e-mail address removed) but in Outlook it comes up as
(e-mail address removed)#mailto:[email protected]#


What am I doing wrong? Thanks for any help!
 
Since EmailAddress is a hyperlink field, its value isn't what you see in the
text box. Hyperlink fields have up to three parts to them:
displaytext#address#subaddress.

Fortunately, there's a HyperlinkPart function you can use:
 
Sorry: that got sent too soon.

Since EmailAddress is a hyperlink field, its value isn't what you see in the
text box. Hyperlink fields have up to three parts to them:
displaytext#address#subaddress.

Fortunately, there's a HyperlinkPart function you can use:

DoCmd.SendObject acSendReport, "Confirmed", , _
HyperlinkPart([EmailAddress], acDisplayText) , , , _
"Booking Confirmation"
 
Thank you so much!!
--
Cheers


Douglas J. Steele said:
Sorry: that got sent too soon.

Since EmailAddress is a hyperlink field, its value isn't what you see in the
text box. Hyperlink fields have up to three parts to them:
displaytext#address#subaddress.

Fortunately, there's a HyperlinkPart function you can use:

DoCmd.SendObject acSendReport, "Confirmed", , _
HyperlinkPart([EmailAddress], acDisplayText) , , , _
"Booking Confirmation"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


Cadburys said:
Hi

I have a button on my form which attaches a report in pdf format to an
email
. The problem is that the email address is coming up incorrectly in
Outlook
and says that it does not recognise the address.

My code is as follows:

DoCmd.SendObject acSendReport, "Confirmed", , [EmailAddress], , ,
"Booking Confirmation"

The [EmailAddress] refers to my email address field on the form which
might
be (e-mail address removed) but in Outlook it comes up as
(e-mail address removed)#mailto:[email protected]#


What am I doing wrong? Thanks for any help!


.
 
Back
Top