I have this code, curtisy of Twinnyfo but I am looking to add another recipient email address as a "cc". Can you please advise on the addition to the code... - Private Sub cmdSubmit_Click()
-
On Error GoTo EH
-
Dim strSubject As String
-
Dim strAddressees As String
-
Dim strEMailBody As String
-
strSubject = "Changes Requested"
-
strAddressees = "your.name@company.com"
-
strEMailBody = "Test Message"
-
DoCmd.SendObject acSendNoObject, , acFormatTXT, strAddressees, , , strSubject, strEMailBody, True
-
Exit Sub
-
EH:
-
MsgBox "There was an error sending this note! Please contact your Database Administrator.", vbCritical, "Error!"
-
Exit Sub
-
End Sub
-
5 3291 twinnyfo 3,653
Recognized Expert Moderator Specialist
Rob, the CC is the argument after the strAddressees. Just set a variable as strCC or something similar or just add the e-mail ddress...
- On Error GoTo EH
-
Dim strSubject As String
-
Dim strAddressees As String
-
Dim strCC As String
-
Dim strEMailBody As String
-
strSubject = "Changes Requested"
-
strAddressees = "yourname@company.com"
-
strCC = "yourname@company.com" strEMailBody = "Please look at changes. Thank you."
-
DoCmd.SendObject acSendNoObject, , acFormatTXT, strAddressees, , , strSubject, strEMailBody, True
-
Exit Sub
-
EH:
-
MsgBox "There was an error sending this note! Please contact your Database Administrator.", vbCritical, "Error!"
-
Exit Sub
-
End Sub
Like so?
twinnyfo 3,653
Recognized Expert Moderator Specialist
That should do it... don't forget to include it in your arguments: -
DoCmd.SendObject acSendNoObject, , acFormatTXT, strAddressees, strCC, , strSubject, strEMailBody, True
-
I'm gonna start coming to you for help, next! :-)
I really hope in some way I will eventually be able to help you or start answering some of the other questions on here!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: rock72 |
last post by:
Hello there,
Can anyone tell me how to create a php script that when the user click
the Submit button, a message will be sent to friends email add stored
in mysql table?
I created this ff table structure using mysql ?
Field Type Size Description
|
by: Tony Williams |
last post by:
I have a tick box control that when checked opens Outlook and attaches a
report. If the user clicks send then everything is OK. BUT if the user
clicks the close on Outlook without sending the email I want to trap the
error message 2501 and ask the user what to do. Here is my code so far:
Private Sub Loadtxt_Click()
On Error GoTo Exit_Handler
If Me!Loadtxt = True Then
DoCmd.SendObject acSendReport, "rptOnlineUpload", acFormatRTF, , , ,...
|
by: Robert V. Hanson |
last post by:
Please give me some ideas on how to setup the ability to test
System.Web.Mail code to send emails using just my development computer,
Win2000Pro OS and IIS5.0?
Thanks,
Bob Hanson
|
by: |
last post by:
Trying to learn about manipulating collections of objects, and populating
these objects dynamically from datasources. Could someone post a code sample
that shows the following:
Instantiating a collection object -- say, a dictionary.
Populating that collection object with custom objects, say, Person. What I
really want to see is how to populate the properties of those Person objects
from a datasource: instantiate one Person, fill...
|
by: Liam.M |
last post by:
I currently HAVE a form...a "Summary List" it could be called...which
is
a contineous form...AND on this form are "Four fields" from EVERY
record (each on their own line) so to seak...like a running summary of
ALL the Records in the Database!
NOW upon clicking "one" of these lines...it then opens that specific
Record in the Database...which is linked through and by a "Record ID"!
The "four fields" that are exhibited in this contineous...
| |
by: Walshi |
last post by:
Hi all,
I'm a relative newby to access and VBA etc. My forms and tables etc are
working great and saving lots of time...However...
I have two databases with the exact same table format. I want db1 to be
used to input data by a remote operator, when she is ready I want her
to be able to click a control button to email her new data to db2. This
new data will be added to the table in db2 ready for further
processing.
|
by: xian2 |
last post by:
Hi All,
I have been using this guide http://www.compasscomputing.co.uk/code/AcceesReportsToPDFandEmail.htm to create a command button that automatically saves and e-mails your report and have tried to edit the code, as below (the original code is on his website) but get a load of error messages.
There are only a few bits that need editing (about 6 or 7 little bits) but I still get loads of error messages and if anyone can help, I would...
|
by: DrNoose |
last post by:
Hi!
I'm working on code for a feedback form. I want the data from the user
that is taken from the form to be emailed back to me. I'm using vb with
visual studios 2005.
I have most of the code, but have some missing stuff, because I'm not
totally sure what I'm doing!
Can someone take a look at this code and tell me what I'm missing.
|
by: .spider |
last post by:
Hi,
I have a code here (taken from http://www.dotnetwatch.com/page294.aspx).
Now i didn't think there was anything wrong with this code(no
compilation errors..nothing)..and infact when i ran this code in
visual web developer in the debug mode, the code DID mail to the
recipient email id. However, after uploading the codes to my hosting
account, upon submiting the form(which sends contents of 'TextBox1'
and 'TextBox3' to rcv@domain.com), a...
|
by: aquils |
last post by:
I have a program which has 4 layers, the PL, Webservice, BL and DL. I have a form which sents an email, any suggestions where should I write the code for sending emails.
Thanks
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |