D
Dave Elliott
On Error GoTo Error_Handler
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
I have a continous form that shows my Customer, Invoice Number, Bid Price
and Job Description (frminvlist)
I also have a Yes/No control on the form named Selected, Default is No
These are all from the same table.
If I check the Yes/No control and then choose the Command Button on the form
named Command203,
Then I wish to open all the Invoices,Hidden and then send to my
CutePDFPrinter, I have been doing this by a macro
SelectObject Report RMothStatmnt
RunCommand Print
And then saving the reporrtt as a file, then clicking on the command button
on my main form to e-mail
This works ok for just one Invoice.
The code below is for the Command203 button on the form.
Is there a way to send all the Invoices I check to the printer,create a pdf
and then e-mail all of the selected invoices?
With objEmail
.To = InputBox("Type Address Here!")
.Subject = "Invoice from Gulf Coast Electric"
.body = "Thanks for your Business"
.Attachments.Add "C:\PDFReports\Invoice.pdf"
'.attachments.Add "c:\Path\to\the\next\file.txt"
.Send
'.ReadReceiptRequested
End With
Exit_Here:
Set objOutlook = Nothing
Exit Sub
Error_Handler:
MsgBox err & ": " & err.Description
Resume Exit_Here
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
I have a continous form that shows my Customer, Invoice Number, Bid Price
and Job Description (frminvlist)
I also have a Yes/No control on the form named Selected, Default is No
These are all from the same table.
If I check the Yes/No control and then choose the Command Button on the form
named Command203,
Then I wish to open all the Invoices,Hidden and then send to my
CutePDFPrinter, I have been doing this by a macro
SelectObject Report RMothStatmnt
RunCommand Print
And then saving the reporrtt as a file, then clicking on the command button
on my main form to e-mail
This works ok for just one Invoice.
The code below is for the Command203 button on the form.
Is there a way to send all the Invoices I check to the printer,create a pdf
and then e-mail all of the selected invoices?
With objEmail
.To = InputBox("Type Address Here!")
.Subject = "Invoice from Gulf Coast Electric"
.body = "Thanks for your Business"
.Attachments.Add "C:\PDFReports\Invoice.pdf"
'.attachments.Add "c:\Path\to\the\next\file.txt"
.Send
'.ReadReceiptRequested
End With
Exit_Here:
Set objOutlook = Nothing
Exit Sub
Error_Handler:
MsgBox err & ": " & err.Description
Resume Exit_Here