Emailing Attachments/Hyperlink

BDW Jr

Registered User.
Local time
Yesterday, 20:24
Joined
May 10, 2009
Messages
18
Hello,

I have a form that has a hyperlink on it that opens that specific file. I'm trying to create a button that will allow me to email that specific file to someone. This is the code I've been playing around with for a few days but I can't get it to work right:


Private Sub EmailRequestComm_Click()
On Error GoTo EmailRequestComm_Err

DoCmd.SendObject acSendNoObject, "", acFormatPDF, "esmith@abc.biz", "jcoltrain@abc.biz", "", Notes, FileName, True, ""
(Notes and FileName are the names of fields on form)

EmailRequestComm_Exit:
Exit Sub
EmailRequestComm_Err:
MsgBox Error$
Resume EmailRequestComm_Exit
End Sub


When I press the button, Outlook opens with the emails in the proper location, Subject line is fine but in the body of the email I get the full hyperlink name of Chasing Ponies.pdf#S:\Operations\Data\DCR\SADLS\Chasing Ponies.pdf. The reason the file name appears with a # then the location is because when the user is looking at the hyperlink on the form, I only want them to see the file name and not the location. Is there a way I can get the actual file to attach to the email?

Thanks
 

Users who are viewing this thread

Back
Top Bottom