is this possable to send more than 1 report in one email 7 12389
Mega1 wrote: is this possable to send more than 1 report in one email
Send each report as a separate attachment. Save the report as Snapshot
files (or something else) and then run the email & just attach the saved
files.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
i want to automate this so when people click on it the email just sends
"MGFoster" <me@privacy.com> wrote in message
news:T8*****************@newsread1.news.pas.earthl ink.net... Mega1 wrote: is this possable to send more than 1 report in one email
Send each report as a separate attachment. Save the report as Snapshot files (or something else) and then run the email & just attach the saved files.
-- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA)
If you're interested I will create a sample database (A2003) which should
meet your needs; let me know.you can email me directly.
Cheers,
Dave
"Mega1" <me***@oceanfree.net> wrote in message
news:fB*******************@news.indigo.ie... i want to automate this so when people click on it the email just sends "MGFoster" <me@privacy.com> wrote in message news:T8*****************@newsread1.news.pas.earthl ink.net... Mega1 wrote: > is this possable to send more than 1 report in one email > > Send each report as a separate attachment. Save the report as Snapshot files (or something else) and then run the email & just attach the saved files.
-- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA)
Hi there,
All that you need is just creating an Outlook item and
add some code there to trigger it.
Also Microsoft Outlook 9.0 Object Library must be checked in
Tool/References area.
I added a short sample below.
I hope you'll find your answers there.
Take care.
Murat.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub SendMessage()
Dim OL As Outlook.Application, OI As Outlook.MailItem, OA As Outlook.Attachments
Set OL = Outlook.Application
Set OI = OL.CreateItem(olMailItem)
OI.Recipients.Add "ms*****@ford.com.tr"
OI.CC = "an****@ford.com.tr"
OI.BCC = "so*****@ford.com.tr"
OI.Subject = "Sample"
OI.Body = "Hi there"
Set OA = OI.Attachments
OA.Add "L:\FMS\REPORTS\Lease.xls", olByValue, 1, "Leasing Report"
OA.Add "L:\FMS\REPORTS\Action.xls", olByValue, 1, "Action Report"
OA.Add "L:\FMS\REPORTS\Finance.xls", olByValue, 1, "Finance Report"
OI.Send
End Sub
This is the code i was using
Dim MyDB As Database
Dim MyRS As dao.Recordset
Dim TheAddress As String
Dim stDocName As String
Set MyDB = CurrentDb
Set MyRS = MyDB.OpenRecordset("qryEmailFlyer")
MyRS.MoveFirst
Do Until MyRS.EOF
TheAddress = MyRS![EmailAddress]
stDocName = "Movie Program"
DoCmd.SendObject acReport, stDocName, acFormatSNP, TheAddress, , ,
"movie program Starting " & Text2, "If you cannot view please download the
viewer at
http://www.microsoft.com/downloads/details.aspx?FamilyID=b73df33f-6d74-423d-8274-8b7e6313edfb&DisplayLang=en",
False
DoCmd.SendObject acReport, "Synopsis", acFormatSNP, TheAddress, , ,
"Synopsis", , False
MyRS.MoveNext
Loop
"Fahrettin Murat Selcuk" <ms*****@ford.com.tr> wrote in message
news:7d**************************@posting.google.c om... Hi there,
All that you need is just creating an Outlook item and add some code there to trigger it.
Also Microsoft Outlook 9.0 Object Library must be checked in Tool/References area.
I added a short sample below.
I hope you'll find your answers there.
Take care.
Murat.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - Sub SendMessage() Dim OL As Outlook.Application, OI As Outlook.MailItem, OA As
Outlook.Attachments Set OL = Outlook.Application Set OI = OL.CreateItem(olMailItem) OI.Recipients.Add "ms*****@ford.com.tr" OI.CC = "an****@ford.com.tr" OI.BCC = "so*****@ford.com.tr" OI.Subject = "Sample" OI.Body = "Hi there" Set OA = OI.Attachments OA.Add "L:\FMS\REPORTS\Lease.xls", olByValue, 1, "Leasing Report" OA.Add "L:\FMS\REPORTS\Action.xls", olByValue, 1, "Action Report" OA.Add "L:\FMS\REPORTS\Finance.xls", olByValue, 1, "Finance Report" OI.Send End Sub
I read your message to quickly; my example provides the option to send one
report to multiple email addresses. Regardless, it may prove of value, and
can easily be modified: the zipped example is only 96kb.
Cheers,
Dave
Code used for Button to send email:
'================================================= ====
Private Sub cmdSendRpt_Click()
' Attach Access Snapshot Report to Email & Send
Dim strTO As String
Dim strCc As String
Dim cnt As Long
If Me.lstEMailAddresses.ItemsSelected.Count = 0 Then
MsgBox "No email addresses have been selected; please select one or
more " _
& "email addresses, and then try again."
Else
For cnt = 0 To Me.lstEMailAddresses.ItemsSelected.Count - 1
strTO = strTO & ";" & Me.lstEMailAddresses.Column(0, _
Me.lstEMailAddresses.ItemsSelected(cnt))
Next cnt
strTO = Mid(strTO, 2)
' Send Report using MS Access Snapshot
DoCmd.SendObject acReport, "rptPersEMail", "SnapshotFormat(*.snp)", _
strTO, strCc, "", "Place Your Email Subject Heading Here", "From the
Office " _
& "of... Your Name Here - Report Name Here (Optional)." & vbCrLf &
vbCrLf _
& "Please see attached MS Access Snapshot Report" & vbCrLf & vbCrLf &
vbCrLf & vbCrLf & "----------------------------" _
& vbCrLf & vbCrLf & "Microsoft Snapshot Viewer Required to view
attachment: Download Snapshot " _
& "Viewer from the Microsoft Site: " _
&
"http://www.microsoft.com/downloads/details.aspx?familyid=B73DF33F-6D74-423D-8274-8B7E6313EDFB&displaylang=en"
_
& vbCrLf & vbCrLf & "The Snapshot Viewer enables you to view a report
snapshot without having the standard or run-time versions of Microsoft
Access.", True
End If
End Sub
'================================================= ====
and
Create a new module:
'================================================= ====
Option Compare Database 'Use database order for string comparisons
Option Explicit 'Require variables to be declared before being
used
'************ Code Start **********
'This code was originally written by Dev Ashish.
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Dev Ashish
Private Declare Function apiShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long
'***App Window Constants***
Public Const WIN_NORMAL = 1 'Open Normal
Public Const WIN_MAX = 2 'Open Maximized
Public Const WIN_MIN = 3 'Open Minimized
'***Error Codes***
Private Const ERROR_SUCCESS = 32&
Private Const ERROR_NO_ASSOC = 31&
Private Const ERROR_OUT_OF_MEM = 0&
Private Const ERROR_FILE_NOT_FOUND = 2&
Private Const ERROR_PATH_NOT_FOUND = 3&
Private Const ERROR_BAD_FORMAT = 11&
'***************Usage Examples***********************
'Open a folder: ?fHandleFile("C:\TEMP\",WIN_NORMAL)
'Call Email app: ?fHandleFile("mailto:da****@hotmail.com",WIN_NORMA L)
'Open URL: ?fHandleFile("http://home.att.net/~dashish",
WIN_NORMAL)
'Handle Unknown extensions (call Open With Dialog):
' ?fHandleFile("C:\TEMP\TestThis",Win_Normal)
'Start Access instance:
' ?fHandleFile("I:\mdbs\CodeNStuff.mdb", Win_NORMAL)
'************************************************* ***
Function fHandleFile(stFile As String, lShowHow As Long)
Dim lRet As Long
Dim varTaskID As Variant
Dim stRet As String
'First try ShellExecute
lRet = apiShellExecute(hWndAccessApp, vbNullString, _
stFile, vbNullString, vbNullString, lShowHow)
If lRet > ERROR_SUCCESS Then
stRet = vbNullString
lRet = -1
Else
Select Case lRet
Case ERROR_NO_ASSOC:
'Try the OpenWith dialog
varTaskID = Shell("rundll32.exe shell32.dll,OpenAs_RunDLL " _
& stFile, WIN_NORMAL)
lRet = (varTaskID <> 0)
Case ERROR_OUT_OF_MEM:
stRet = "Error: Out of Memory/Resources. Couldn't Execute!"
Case ERROR_FILE_NOT_FOUND:
stRet = "Error: File not found. Couldn't Execute!"
Case ERROR_PATH_NOT_FOUND:
stRet = "Error: Path not found. Couldn't Execute!"
Case ERROR_BAD_FORMAT:
stRet = "Error: Bad File Format. Couldn't Execute!"
Case Else:
End Select
End If
fHandleFile = lRet & _
IIf(stRet = "", vbNullString, ", " & stRet)
End Function
'================================================= ==== This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: halsa |
last post by:
hi
I need to append multiple reports to a single report.For
example I have 2 Pending Invoice reports to print.The
report viewer has to preview...
|
by: Eliezer Figueroa |
last post by:
Managing Multiple Excel incoming files?
I have this situation. I have a client which have several locations they
work primary with excel forms...
|
by: AIMTech |
last post by:
We have an IIS+ASP based application server that is capable of providing
complex reports to hundreds of users but in some circumstances these...
|
by: Sigurd Bruteig |
last post by:
Hi all!
I have a problem printing multiple reports. The code i use is:
Dim stDocName As String
stDocName = "rptInvoice"
DoCmd.OpenReport...
|
by: Jeremy |
last post by:
I have built a form that calls queries. I have the first 2 set up as
select queries, and the third set up as a make table query. When
multiple...
|
by: ian_jacobsen |
last post by:
First let me start by saying that this problem is not consistently
reproducible. I have a windows service that creates reports for a
group of...
|
by: alpnz |
last post by:
Hi,
I have a need to send snap reports to various shipping agents.
E.g.
A PalletCard, A FreightNote, A Consignment Advice, and an Export...
|
by: n8kindt |
last post by:
ok, i've done quite a bit of research on my problem here. random "! " will appear in my email that i'm sending thru cdo. i've learned that this...
|
by: MyWaterloo |
last post by:
So, I have a database I'm using for Employee Time Sheets. The pay period is a two week cycle. There is one report for each week. I would like to...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the...
| |