Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send Purchase orders to some suppliers with email

Status
Not open for further replies.

budich

Programmer
Oct 7, 2000
79
0
0
ID
Hi Guys,

Does anyone know how to make a procedure for sending email to a list of recipient with different report's contain. For example I will send some purchase orders to some suppliers with email. The previous post that I have known were discuss about sending the same report to a list of email address. How if the reports is different for each recipients ??
 
Hey,

I think what you mean is the following; correct me if I'm wrong...

You have a form where you enter your PO for each supplier. On the form, you want a button which "mails" the report behind the form to this specific supplier.

In this case, you can use the following code :

Private Sub Btn_Emailen_Click()
On Error GoTo Err_Btn_Emailen_Click


Dim address As String
Dim Mailtext As String

'use email-field on my form
address = Me!EMAIL
Mailtext = "Dear, please find my PO attached. Regards, dfdfdf"
DoCmd.SendObject acReport, "PO report", acFormatRTF, address, , , "Bestelling Parfumerie Verhofste", Mailtext, True, "PNr=" & PoNr

explanation for DoCmd...
DoCmd.sendobject acreport = start MS Outlook with a new mailmessage
"PO Report" = name of your report
acformatRTF = send report as attachment in RTF-format
address, , , = email address lines on your mail message (= To, CC & BCC)
Mailtext = standard message you can use
True = MS Outlook will show you the mail setup before sending it; in this case, you can still modify your mail message
"PNr=" & PONr = criteria which means "get me the report where the field PNr (on the report) equals the field PONr (on the form).

In this situation, the PO-report is saved as an RTF-document, created as attachment in your Mail software and the new mail message stays on the screen until you click "SEND" on it.

Good luck...

PdtIt
Exit_Btn_Emailen_Click:
Exit Sub

Err_Btn_Emailen_Click:
MsgBox Err.Description
Resume Exit_Btn_Emailen_Click

End Sub
 
Hi
I have an example db that will send report (po) to a specific supplier, ie enter 10 po's to 10 suppliers, click button and all po's(reports)go to correct supplier. if this is what you want I can e-mail this to you. email me at meadowsstephen@hotmail.com

Stephen
 
Yes, Smeadows
I need the example DB soon, please !!!!!!
you can email me to budijanto@indo.net.id
Thank's a million
regards
BUdi
 
Hi Pdtit,

Thank you for your reply.
I don't think your post is same as with my problem. In your procedure was send 1 PO for 1 recipient with press 1 button.
What I need as Smeadows said : send several PO to it's recipient destination with press 1 button. So, I need to send some different report to each recipients.
Thank you
regards
Budi
 
Hi Stephen,

I am waiting for your sample DB. Please!!
Thank you in advance
regards
Budi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top