firestorm998
Registered User.
- Local time
- Today, 15:01
- Joined
- Nov 28, 2006
- Messages
- 24
I've got as far as the below basic code to send an email from my DB but am struggling to figure out how to define/add/use the filepath of a PDF doc that I store in a field called 'DOCS1' so that it can add it as the attachement to the email:
Private Sub Command18_Click()
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.CreateItem(0)
With oMail
.To = "someone@email.com"
.Body = "Attached is a PDF file for your viewing"
.Subject = [Form_Master Form]![Description]
'.Attachments.Add ??????????????
.Display
End With
Set oMail = Nothing
Set oLook = Nothing
End Sub
Any directions thankfully received!
Private Sub Command18_Click()
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.CreateItem(0)
With oMail
.To = "someone@email.com"
.Body = "Attached is a PDF file for your viewing"
.Subject = [Form_Master Form]![Description]
'.Attachments.Add ??????????????
.Display
End With
Set oMail = Nothing
Set oLook = Nothing
End Sub
Any directions thankfully received!