2 quick questions abt e-mailing from access *1082008

J

J.Alladien

Hello guys,

1.I am currently using this (extremely usefull .I might add) code to
email to a group of people:

Option Explicit


' ****************************************************************
' This function will walk through the Customers table and fax the
' Invoice report, which is filtered by the CustomerID field using
' MS Fax through the MS Access SendObject.
' This function assumes the Invoice report has the default
' printer set to MS Fax and the MS Fax driver is installed
' correctly.
' ****************************************************************

Function FaxInvoices()

Dim dbsNorthwind As Database
Dim rstCustomers As Recordset

Set dbsNorthwind = CurrentDb()
Set _
rstCustomers = dbsNorthwind.OpenRecordset("Customers", dbOpenDynaset)

If MsgBox("Do you want to fax invoices" & Chr(13) & _
"to all customers using Microsoft Fax?", 4) = 6 Then
With rstCustomers
Do Until .EOF
' Create the Invoice report Filter used by the Report_Open
' event.

DoCmd.SendObject acReport, "Invoice", acFormatRTF, _
" " & ![E-MAIL] & "", , , , , False
.MoveNext
Loop
End With
End If
rstCustomers.Close
End Function

BUT INSTEAD OF ATTACHING A REPORT FROM my DB ,I WOULD LIKE TO ATTACH A PDF
FILE IN LET'S SAY C:/FOLDER/TEST.PDF!

HOW SHOULD I MODIFY THE ABOVE WRITTEN CODE TO DO THIS?

2.EVERYTIME A MAIL GETS SENT TO A PERSON .I GET THE MESSAGE" A PROGRAM IS
TRYING TO SEND A MAIL THROUGH THIS PROGRAM, SEND , DO NOT SEND ETC..." HOW
CAN I DISABLE THIS WARNING,AS IT WOULD BE VERY FRUSTRATING IF YOU HAVE TO DO
THIS EVERY TIME WHEN SENDING TO A BIG GROUP OF PEOPLE!

PLS NOTE I USE OUTLOOK EXPRESS AS MY DEFAULT MAIL!

THANKS IN ADVANCE!
 
A

Arvin Meyer [MVP]

J.Alladien said:
Hello guys,

1. BUT INSTEAD OF ATTACHING A REPORT FROM my DB ,I WOULD LIKE TO ATTACH A
PDF
FILE IN LET'S SAY C:/FOLDER/TEST.PDF!

Why are you YELLING?
HOW SHOULD I MODIFY THE ABOVE WRITTEN CODE TO DO THIS?

You can't. The above code will not handle PDFs. You can use Outlook, with
the following code:

http://www.datastrat.com/Code/OutlookEmail.txt

or you can use other code. Here's one source:

http://www.groupacg.com/
2.EVERYTIME A MAIL GETS SENT TO A PERSON .I GET THE MESSAGE" A PROGRAM IS
TRYING TO SEND A MAIL THROUGH THIS PROGRAM, SEND , DO NOT SEND ETC..."
HOW
CAN I DISABLE THIS WARNING,AS IT WOULD BE VERY FRUSTRATING IF YOU HAVE TO
DO
THIS EVERY TIME WHEN SENDING TO A BIG GROUP OF PEOPLE!

PLS NOTE I USE OUTLOOK EXPRESS AS MY DEFAULT MAIL!

You can use Outlook Redemption to disable the security warning:

http://www.dimastr.com/redemption/
 
J

J.Alladien

Sorry abt the YELLING Arvin, it's a bad habit of mine leaving the caps lock on

abt this code http://www.datastrat.com/Code/OutlookEmail.txt,

this is exactly what I need only I need it in a loop function ,where it
sends the same pdf file to all the people in the table one by one ,I have
tried it but writing code is not exactly my strong side, if you know a sample
file that does the same I would appreciate it if you could send me the link,
cause I have seen it on some website several times,but as always when you
really need it ,it's nowhere to be found!

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top