473,847 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email Multiple Reports on one Email

is this possable to send more than 1 report in one email
Nov 13 '05 #1
7 12590
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:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)
Nov 13 '05 #2
i want to automate this so when people click on it the email just sends
"MGFoster" <me@privacy.com > wrote in message
news:T8******** *********@newsr ead1.news.pas.e arthlink.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:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)

Nov 13 '05 #3
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***@oceanfre e.net> wrote in message
news:fB******** ***********@new s.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******** *********@newsr ead1.news.pas.e arthlink.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:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)


Nov 13 '05 #4
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.Applica tion, OI As Outlook.MailIte m, OA As Outlook.Attachm ents
Set OL = Outlook.Applica tion
Set OI = OL.CreateItem(o lMailItem)
OI.Recipients.A dd "ms*****@ford.c om.tr"
OI.CC = "an****@ford.co m.tr"
OI.BCC = "so*****@ford.c om.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
Nov 13 '05 #5
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.OpenRecord set("qryEmailFl yer")
MyRS.MoveFirst
Do Until MyRS.EOF
TheAddress = MyRS![EmailAddress]

stDocName = "Movie Program"
DoCmd.SendObjec t acReport, stDocName, acFormatSNP, TheAddress, , ,
"movie program Starting " & Text2, "If you cannot view please download the
viewer at
http://www.microsoft.c om/downloads/details.aspx?Fa milyID=b73df33f-6d74-423d-8274-8b7e6313edfb&Di splayLang=en",
False
DoCmd.SendObjec t acReport, "Synopsis", acFormatSNP, TheAddress, , ,
"Synopsis", , False

MyRS.MoveNext
Loop
"Fahrettin Murat Selcuk" <ms*****@ford.c om.tr> wrote in message
news:7d******** *************** ***@posting.goo gle.com...
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.Applica tion, OI As Outlook.MailIte m, OA As Outlook.Attachm ents Set OL = Outlook.Applica tion
Set OI = OL.CreateItem(o lMailItem)
OI.Recipients.A dd "ms*****@ford.c om.tr"
OI.CC = "an****@ford.co m.tr"
OI.BCC = "so*****@ford.c om.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

Nov 13 '05 #6
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
Nov 13 '05 #7
Code used for Button to send email:

'============== =============== =============== =========
Private Sub cmdSendRpt_Clic k()

' Attach Access Snapshot Report to Email & Send

Dim strTO As String
Dim strCc As String
Dim cnt As Long

If Me.lstEMailAddr esses.ItemsSele cted.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.lstEMailAddr esses.ItemsSele cted.Count - 1
strTO = strTO & ";" & Me.lstEMailAddr esses.Column(0, _
Me.lstEMailAddr esses.ItemsSele cted(cnt))

Next cnt

strTO = Mid(strTO, 2)
' Send Report using MS Access Snapshot
DoCmd.SendObjec t acReport, "rptPersEMa il", "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.c om/downloads/details.aspx?fa milyid=B73DF33F-6D74-423D-8274-8B7E6313EDFB&di splaylang=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.dl l" _
Alias "ShellExecu teA" _
(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_ME M = 0&
Private Const ERROR_FILE_NOT_ FOUND = 2&
Private Const ERROR_PATH_NOT_ FOUND = 3&
Private Const ERROR_BAD_FORMA T = 11&

'************** *Usage Examples******* *************** *
'Open a folder: ?fHandleFile("C :\TEMP\",WIN_NO RMAL)
'Call Email app: ?fHandleFile("m ailto:da****@ho tmail.com",WIN_ NORMAL)
'Open URL: ?fHandleFile("h ttp://home.att.net/~dashish",
WIN_NORMAL)
'Handle Unknown extensions (call Open With Dialog):
' ?fHandleFile("C :\TEMP\TestThis ",Win_Norma l)
'Start Access instance:
' ?fHandleFile("I :\mdbs\CodeNStu ff.mdb", Win_NORMAL)
'************** *************** *************** ********

Function fHandleFile(stF ile 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,Ope nAs_RunDLL " _
& stFile, WIN_NORMAL)
lRet = (varTaskID <> 0)
Case ERROR_OUT_OF_ME M:
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_FORMA T:
stRet = "Error: Bad File Format. Couldn't Execute!"
Case Else:
End Select

End If

fHandleFile = lRet & _
IIf(stRet = "", vbNullString, ", " & stRet)

End Function
'============== =============== =============== =========
Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1868
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 these two reports like two different pages and then it has to print. The problem I am facing now is its checking for two reports but it displaying thonly last report in the crystal Report viewer.Could you guys have any idea how to solve this problem.
0
1678
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 and they are thinking in doing reports with them. What they want is to import those Excel files into SQL Server for later using crystal reports or maybe asp.net for reporting. Those files will come every week from diferent locations then go to SQL Server and then they should be stored in a folder...
0
1287
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 reports can take a long time to create. However the data for the report is cached so subsequent calls to view the same report come back with a sub-second response time. In order to make use of this caching we pre-prepare some of the reports by getting back a list of potential users from the server...
2
4568
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 stDocName, acNormal, , " = date()" The problem is that invioce details is printed several times on the same invoice and only the first page is shown as first page, even if all reports have only one page. I gess I have to loop trough the code, but I can't figure out how to.
1
3461
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 users are on this application at the same time, they get errors or the data is overwritten while they are sitting there. If I do all select queries, 1. the records pop up if I use a "RUN" command button, or if I have my "Report" command button set to the last query then each time they hit one of...
3
8455
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 entities. This service can process multiple groups at a single time, where each group is running in a separate thread. I have noticed mixed behavior when running multiple groups at one time (in separate threads). I have received the following two messages logged as errors. - A Crystal Reports...
8
8561
alpnz
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 declaration of Conformity. It is easy enough to code a sendobject event for a button click, however this results in One email for each object, and it is named as per the report name. What I would like to achieve is One email with multiple attachments, which we send to a Contact Group in Outlook. So I...
4
2007
n8kindt
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 problem occurs when there are long lines of html (or rich text in my case) of 512 characters or more. i've found multiple places that state the following: "We have identified errors occurring in Outlook where the HTML message contains a long line of code of over 512 characters without a line break....
5
2424
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 just combine the two weeks into one report, but my company has this "interesting" (say backwards) system that they don't want to change. So instead of filling out the time sheets by hand *gasp* (I know) I created a database (obviously). Anyway, how can I attach both reports to a single email? I...
0
9882
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10645
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10706
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10335
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7880
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4116
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3160
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.