473,657 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DoCmd.SendObjec t to table of email addresses?

3 New Member
I'd like to send a report to a distribution of email addresses. The distribution list is stored in Email.[email]. How do I use the DoCmd.SendObjec t to send to a list? The command below isn't working:
DoCmd.SendObjec t acReport, "Upcoming Week OT Report", "RichTextFormat (*.rtf)", Email.[email], "", "", "Upcoming Week OT Report", "", False, ""
Sep 27 '06 #1
4 8821
isetea
44 New Member
Hello,
I'm not an expert with Access, but I had a very similar problem last time and maybe you can try this code.

Dim stDocName As String

stDocName = "Reportname "
DoCmd.SendObjec t acReport, stDocName, acFormatRTF, "TO", "CC", "BCC", "Upcoming Week OT Report"

If you are familiar with VBA, you can have a look what you need there or use Access help and look for 'SendObject Method'.

Hope this helps

Cheers

I'd like to send a report to a distribution of email addresses. The distribution list is stored in Email.[email]. How do I use the DoCmd.SendObjec t to send to a list? The command below isn't working:
DoCmd.SendObjec t acReport, "Upcoming Week OT Report", "RichTextFormat (*.rtf)", Email.[email], "", "", "Upcoming Week OT Report", "", False, ""
Sep 27 '06 #2
dszmauz
3 New Member
I'll give it a try. Thanks!
Sep 28 '06 #3
dszmauz
3 New Member
Another programmer gave me the following and it's working:
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim strSQL As String
strSQL = "Select * from EmailTable"
rs.Open strSQL, CurrentProject. Connection, adOpenKeyset, adLockReadOnly
rs.MoveFirst
Do While Not rs.EOF
DoCmd.SendObjec t acSendReport, "Upcoming Week OT Report", acFormatRTF, rs!EmailAddress , , , "New Way", "Upcoming Week OT Report", False
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
Sep 28 '06 #4
PEB
1,418 Recognized Expert Top Contributor
But maybe you are working with Visual Basic 6.0 and not with Access???

Or with Access but on an Access project connected to SQL Server?

Those are important details however!

:)
Sep 30 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
4618
by: Jay Bienvenu | last post by:
I am trying to execute a DoCmd.SendObject command to produce an email message from Access 2000. The command produces the email message, but the To:, CC: and BCC: fields are blank. The subject field and content come across fine. I can verify that the information isn't leaving Access. My client is experiencing the same problem. I tried it on two different computers; same problem.
1
9921
by: Alfred | last post by:
Hi I am using access 2002 1.0 I want to email a word or html file using the docmd.sendobject The document must be send as a attachment. 2.0 Second I would like to tell the Docmd.Sendobject to take the Info in a html or word document and to use it as the body of the email message. Is this possible. How can I do this. Thanks Alfred
3
3777
by: Baz'noid | last post by:
Hi all, With the recent postal strikes here in the UK i'm trying to persuade access to email reports at the touch of a button. I've not been able to figure out how to filter the report - when i print a report via a button i have it filtering to just the customer and invoice on the form on screen, but when i email, it uses the customer details on screen for the email address but produces a separate HTML file for EVERY customer on the...
0
2305
by: TR | last post by:
Hi, Just noticed something unusual. If I use Docmd.SendObject in Access 97, access will open up Lotus Notes to send the email. here is the code: DoCmd.SendObject , , , "SomeBody@Somewhere.com", , , "Subject Line", "Body Text", False If I use the same line of code in Access XP, the message is sent through Exchange. This is happening on the same machine (Win XP). Any ideas why Access97 will use Notes, and XP will use Exchange? Exchange...
1
3895
by: jerry.ranch | last post by:
I collect information from my clients with an xls file I import the xls data into my access table. I don't have them put info directly into Access, because, despite the drop downs I have for data validation in my xls sheet, some fields are not suited to drops downs and there is some editing I have to do. Its not a big deal, I do this maybe 20 times a week. So on a tab in my form, I have a make request button which I want them to be...
1
1934
by: Laura Pouliot | last post by:
Background: I am new to MS Access. I have created a db which contains software inventory information. I would like to utilize a field in the db that contains email addresses of people responsible for software currency. I have created a query that will extract selected information from a table (I have created the same query for all tables in the db because each table contains software inventory data for different areas, e.g. Unix, Intel). ...
1
2220
by: bgreer5050 | last post by:
I am using Access 2000 and need a little help writing the code the proper way to do the following: I have a form with the following fields: "Requestor" and "RequestorEmailAddress" I have a subform with the following fields: "OpenPoNumber" I want to use the DoCmd.SendObject to send an email of the form to the
2
12190
by: Nita | last post by:
Hi, I have no background in scripting (barr HTML) and need some help with hashing out a VB script for a database I'm working on. What my goal is, is to have a single record of a form which is the current focus emailed as PDF to a recipient. I am using Access 2007 and have the export to PDF plugin. The code I have currently got (see below) is successfully emailing a PDF to the recipient, however it is exporting all the records in the...
2
9843
iBasho
by: iBasho | last post by:
Hi, I am trying to set up a notification email that would come to my email everytime users click on a command button in a form. I am using the DoCmd.SendObject command without actually sending any database objects. Private Sub Command107_Click() On Error GoTo Err_Command107_Click DoCmd.SendObject acSendNoObject, , , "email@email.com", , , "Test", "Email Test", , True Exit_Command107_Click: Exit Sub
0
8826
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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...
0
8605
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...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
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.