email current report ONLY to client

nobby

Nobby
Local time
Today, 18:51
Joined
Dec 28, 2008
Messages
27
Hi
I have been reading through the post to try to find the solution to my problem but after adding different chunks of code I always hit the same problem.
I am doing some work for a plumber who having completed his work needs to produce a printed copy of a landlords report ( from his vans printer) to the landlord and then needs to email a copy of that report to the letting agent.
I am nearly there but find that I can print the form OK but I get the whole database merged into an RTF form and emailed to the agent selected

I would like my report ---Landlord Report (immediate) saved in pdf format ( i have nitro pdf)
ID number is autogenerated by ----MasterID
I have the agents email address(es) held in ----agentemail

here are some more recent chunks of code tried

DoCmd.RunCommand acCmdSaveRecord

Dim stDocName As String
stDocName = "Landlord Report (immediate)"
DoCmd.SendObject acReport, stDocName, acFormatRTF, "myemail.co.uk", , , "work completed", "please find attached landlords report completed by me", True
Exit_Err_email_Click:
Exit Sub
End Sub

Me.Filter = "[Control Number]='" & Forms![frmUpdate Controls]![Control Number Combo] & "'"
Dim stDocName As String
stDocName = "Landlord Report (immediate)"
DoCmd.SendObject acReport, stDocName

thanks for your help
 
here are some more recent chunks of code tried

:confused: The chunks do not make a lot of sense without know exactly how and where they are used.

If you want to send as a PDF, you will probably not be able to use the following code
Code:
Dim stDocName As String
stDocName = "Landlord Report (immediate)"
DoCmd.SendObject acReport, stDocName, acFormatRTF, "myemail.co.uk", , , "work completed", "please find attached landlords report completed by me", True

Your first task should be to get the report saved into a PDF. You will need to read the Nitro documentation to see if it is possible to automate this from within Access using VBA.

Once this is done, I would work on figuring out how to get it attached to an Email. If it were me I would use SMTP or Outlook automation to send the PDF. What Email client are you using?
 
Last edited:
I see that you have been posting about this already at Utter Access.

I will monitor and post any further responses at this:

Utter Access Thread
 

Users who are viewing this thread

Back
Top Bottom