S
SUZYQ
I am trying to send multiple small pdf files from Access 2003 via
Outlook to different districts. The problem is, that I don't know the
number of attachments -- it varies by district and by date sent. It
could be 1 or it could be up to 30.
In my email code I tried to loop through a recordset and then keep
attaching the files, but it's not working.
My code is as follows:
Dim cnnLocal as new adodb.recordset
Dim rs As New ADODB.Recordset
Set cnnLocal = CurrentProject.Connection
rs.Open "select Path from tblTemp_ToDistrict where DistrictID = " &
rsDistrict!OfficeID & " and [Path] is not null;", cnnLocal,
adOpenForwardOnly, adLockReadOnly
rs.MoveFirst
Do While Not rs.EOF
mItem.Attachments.Add rs!Path
rs.MoveNext
Loop
Any thoughts?
Outlook to different districts. The problem is, that I don't know the
number of attachments -- it varies by district and by date sent. It
could be 1 or it could be up to 30.
In my email code I tried to loop through a recordset and then keep
attaching the files, but it's not working.
My code is as follows:
Dim cnnLocal as new adodb.recordset
Dim rs As New ADODB.Recordset
Set cnnLocal = CurrentProject.Connection
rs.Open "select Path from tblTemp_ToDistrict where DistrictID = " &
rsDistrict!OfficeID & " and [Path] is not null;", cnnLocal,
adOpenForwardOnly, adLockReadOnly
rs.MoveFirst
Do While Not rs.EOF
mItem.Attachments.Add rs!Path
rs.MoveNext
Loop
Any thoughts?