Valery
Registered User.
- Local time
- Today, 09:15
- Joined
- Jun 22, 2013
- Messages
- 363
Hi,
I would like to update this coding so that the Outlook email window opens directly, with the document attached, and allows me to write a message and click Send... I also do not need to preview or view this document before it is included in the email.
---
Please note that the following coding was graciously given to me and I am not knowledgeable in VBA. As well, the first two lines are commented (just didn't want to lose them as they may be useful in another circumstance
).
THANK YOU!!
I would like to update this coding so that the Outlook email window opens directly, with the document attached, and allows me to write a message and click Send... I also do not need to preview or view this document before it is included in the email.
---
Please note that the following coding was graciously given to me and I am not knowledgeable in VBA. As well, the first two lines are commented (just didn't want to lose them as they may be useful in another circumstance
Code:
Private Sub CmdInfoClient_Click()
'DoCmd.RunCommand acCmdSaveRecord - These two lines sent an email directly
'DoCmd.SendObject acSendReport, "R_ClientsInfo", acFormatPDF, "[EMAIL="bb@hotmail.com"]bb@hotmail.com[/EMAIL]", , , "Client Info_" & Me.LastName & "_" & Me.FirstName, , False
DoCmd.OpenReport "R_ClientsInfo", acViewPreview, , "[Pat_ID]=" & Me![Pat_ID]
DoCmd.SendObject acSendReport, "R_ClientsInfo", acFormatPDF, "[EMAIL="vv@hotmail.com"]vv@hotmail.com[/EMAIL]", , , "Info Client - Relance " & Me.LastName & "_" & Me.FirstName, , False
End Sub
THANK YOU!!