473,663 Members | 2,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DAPs - Create a command button that will send an email through default mail client

beacon
579 Contributor
I have a DAP that I've added a command button to (and by default is set to be coded using vbscript, but I'll use whatever works). The command button uses the onclick method to look at a dropdown list, see if there's anything in it, and return a message as output to the monitor.

This part works great. My main goal, however, is to get the script, once it's displayed the message on the screen, to open the default email client and start an email message. Kind of like the mailto: tag will do...

Here's what I have so far:
Expand|Select|Wrap|Line Numbers
  1. <script language=vbscript event=onclick for=command1>
  2.  
  3. if dropdownlist0.value = "" then
  4.   msgbox "Please select an instructor"
  5. else if dropdownlist0.value = "Instructor 1" then
  6.   msgbox "You selected Instructor 1"
  7. elseif dropdownlist0.value = "Instructor 2" then
  8.   msgbox "You selected Instructor 2"
  9. end if
  10.  
  11. </script>
  12.  
Ultimately, I'm trying to create a quiz that will email your scores to the instructor that you chose from the dropdown list once you click on submit.

We use Microsoft Outlook on the Exchange Server at my work.
Aug 20 '08 #1
2 1722
risk32
98 New Member
Beacon,
I'm doing a little research on this matter to help you out, but here's for starters...
You're going to have to open Outlook to send an email, no question about that.
Here's a way to do it (this part would go in your command button portion)
Example Default Location:
Expand|Select|Wrap|Line Numbers
  1. Shell ("C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE")
  2.  
Of course, this is only to open the program itself. Creating a new message with subject / body insertions is a little more tricky. I'll have more info ASAP.

Regards,
Adam
Nov 3 '08 #2
risk32
98 New Member
Here's something I came across for email using Access VBA... Might want to give a look at it.

http://www.everythingaccess.com/tuto...curity-Warning
Nov 3 '08 #3

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

Similar topics

2
476
by: Jack | last post by:
Hello, I have a web-based application, located on the Internet, and I'd like to use a command button like a hyperlink. Ideally, I'd like to have the users default mail client be initiated with my application populating the recipient and subject. I have the latter values in variables, I just need to know how to initiate the user's default mail client and pass the recipient and subject values in. Thanks in advance!!
3
3488
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure sites. Perhaps, that it is so, although I know of no site that has this prohibition, and I have uploaded DAPs to various sites and used them from those sites. I do not understand why any site manager would prohibit DAPs. To the best of my knowledge DAPs, as HTM files, are merely hosted on the...
2
10683
by: Landley | last post by:
Hello, Is there a way of creating an email, attaching a file and sending using the client's default mail client? I am looking for a none email client specific solution that does not involve specifying parameters such as mail servers etc. Cheers,
24
1726
by: Lauren Wilson | last post by:
OK, I'm confused. SOME folks here seem to be saying it IS possible to link to or otherwise access and manipulate MDB files stored on a web server (from the client) and others seem to be saying it's NOT possible. Assuming the latter is correct, shouldn't it be possible to do it with a hidden Data Access Page running on the client machine? I assume it's possible to run a DAP without revealing it to the client user -- correct?
5
2582
by: Alain | last post by:
Hi, I am trying to figure out why I get the following error when I try to send a mail from an ASP.NET (1.1) application. When I use the same code from a Windows exe then the code works perfectly, so I suppose that is has something to do with security settings for IIS or SMTP Server. Can anybody help me, because I am getting desperate. I have also looked it up on the web but I get a lot of stuff that I have tried but none of the...
16
4738
by: =?Utf-8?B?Q2hlZg==?= | last post by:
I can use outlook2003 to send email,but I cann't use this code below to send email. Please help me to test this code and instruct me how to solve this problem in detail. software environment: VS2005 + XP.-- I have disabled firewall hardware enviornmnet:telcom's modem connects hub,hub connects two computers.。-- I also tried to connect computer to modem directly,but I can
7
3478
by: Wiebe Tijsma | last post by:
Hi, I'm using C# + webDAV to create a draft message to be sent in a user's Drafts folder. I can create the message successfully, however when I open the message in outlook, it doesn't show the 'send' button, (only 'reply' etc as if it was a received message). I'm using exchange explorer to see the difference in webDAV properties
4
3006
by: Ken Fine | last post by:
I'm making an administrative interface that lists records in a GridView. For *each* row in the gridview, I would there to be two interface elements in addition to some information associated with the record. Those interface elements are a Button and a TextBox. The idea is that the administrator using the interface will fill in an e-mail address and press the button if they want to send that particular record to someone by e-mail. (I know...
7
16899
by: mukeshrasm | last post by:
Hi I am no able to send mail and it is giving this error Warning: mail(): SMTP server response: 530 5.7.3 Client was not authenticated in c:\inetpub\wwwroot\eshop\includes\classes\email.php on line 522 and the code is: <?php /* $Id: email.php,v 1.12 2003/06/17 17:29:44 dgw_ Exp $
0
8778
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
8636
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
7375
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...
1
6187
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
5660
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();...
0
4185
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
4351
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1759
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.