I would like to send email automatically via a command button. I have
accomplished this just fine through the following code: (Outlook
should already be open for reliable results)
Private Sub Command6_Click()
ReturnValue = Shell("Outlook.EXE", 1) ' Run Outlook
SendKeys "%(F)", True
SendKeys "W", True
SendKeys "M", True 'Open New Message
SendKeys "ra*********@harbornet.com", True '<-- Email Address
SendKeys "{TAB 2}", True
SendKeys "TestSubject", True '<-- Subject Line
SendKeys "{TAB}", True
SendKeys "Test Message", True '<-- Message Text
SendKeys "%(s)", True 'Send Message
End Sub
I have gone a little overkill with the sendkeys command (VB newbie).
Can any of you guru's step into my code so that it will place the
value of a text box rather than the values I have submited via
sendkeys for the email address, subjectline, and message text.
Your help is greatly appreciated.
Regards,
Jeremy 6 12159
Mr. Bungle wrote: I would like to send email automatically via a command button. I have accomplished this just fine through the following code: (Outlook should already be open for reliable results)
Private Sub Command6_Click() ReturnValue = Shell("Outlook.EXE", 1) ' Run Outlook SendKeys "%(F)", True SendKeys "W", True SendKeys "M", True 'Open New Message SendKeys "ra*********@harbornet.com", True '<-- Email Address SendKeys "{TAB 2}", True SendKeys "TestSubject", True '<-- Subject Line SendKeys "{TAB}", True SendKeys "Test Message", True '<-- Message Text SendKeys "%(s)", True 'Send Message End Sub
I have gone a little overkill with the sendkeys command (VB newbie). Can any of you guru's step into my code so that it will place the value of a text box rather than the values I have submited via sendkeys for the email address, subjectline, and message text.
Your help is greatly appreciated.
Regards, Jeremy
Consider DoCmd.SendObject or
Application.FollowHyperLink "mailto:adress@domain?subject=wibble&body=text "
--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Mr. Bungle wrote: I would like to send email automatically via a command button. I have accomplished this just fine through the following code: (Outlook should already be open for reliable results)
Private Sub Command6_Click() ReturnValue = Shell("Outlook.EXE", 1) ' Run Outlook SendKeys "%(F)", True SendKeys "W", True SendKeys "M", True 'Open New Message SendKeys "ra*********@harbornet.com", True '<-- Email Address SendKeys "{TAB 2}", True SendKeys "TestSubject", True '<-- Subject Line SendKeys "{TAB}", True SendKeys "Test Message", True '<-- Message Text SendKeys "%(s)", True 'Send Message End Sub
I have gone a little overkill with the sendkeys command (VB newbie). Can any of you guru's step into my code so that it will place the value of a text box rather than the values I have submited via sendkeys for the email address, subjectline, and message text.
Your help is greatly appreciated.
Regards, Jeremy
Consider DoCmd.SendObject or
Application.FollowHyperLink "mailto:adress@domain?subject=wibble&body=text "
--
Error reading sig - A)bort R)etry I)nfluence with large hammer
Trevor Best <nospam@localhost> wrote in message news:<40***********************@auth.uk.news.easyn et.net>... Mr. Bungle wrote:
I would like to send email automatically via a command button. I have accomplished this just fine through the following code: (Outlook should already be open for reliable results)
Private Sub Command6_Click() ReturnValue = Shell("Outlook.EXE", 1) ' Run Outlook SendKeys "%(F)", True SendKeys "W", True SendKeys "M", True 'Open New Message SendKeys "ra*********@harbornet.com", True '<-- Email Address SendKeys "{TAB 2}", True SendKeys "TestSubject", True '<-- Subject Line SendKeys "{TAB}", True SendKeys "Test Message", True '<-- Message Text SendKeys "%(s)", True 'Send Message End Sub
I have gone a little overkill with the sendkeys command (VB newbie). Can any of you guru's step into my code so that it will place the value of a text box rather than the values I have submited via sendkeys for the email address, subjectline, and message text.
Your help is greatly appreciated.
Regards, Jeremy Consider DoCmd.SendObject or Application.FollowHyperLink "mailto:adress@domain?subject=wibble&body=text "
2 questions about this...
Using the Application.FollowHyperlink can you bind the email address,
subject, and body to a control on your form?
The DoCmd.SendObject command works wonders at home where I developed
it, it automatically sends email exactly how I want it. However, to my
demise,at work the function does absolutly nothing. We use an exchange
server at work (which is where I want to use this). Might this
(exchange server) have something to do with why the DoCmd.SendObject
does not work?
The Application.FollowHyperlink alternative approach works fine at my
work, the only problem as notated above is that I would like to bind
the email, subject, and body to a control on the form. Any
suggestions?
Regards,
Jeremy
Thanks,
Jeremy
Trevor Best <nospam@localhost> wrote in message news:<40***********************@auth.uk.news.easyn et.net>... Mr. Bungle wrote:
I would like to send email automatically via a command button. I have accomplished this just fine through the following code: (Outlook should already be open for reliable results)
Private Sub Command6_Click() ReturnValue = Shell("Outlook.EXE", 1) ' Run Outlook SendKeys "%(F)", True SendKeys "W", True SendKeys "M", True 'Open New Message SendKeys "ra*********@harbornet.com", True '<-- Email Address SendKeys "{TAB 2}", True SendKeys "TestSubject", True '<-- Subject Line SendKeys "{TAB}", True SendKeys "Test Message", True '<-- Message Text SendKeys "%(s)", True 'Send Message End Sub
I have gone a little overkill with the sendkeys command (VB newbie). Can any of you guru's step into my code so that it will place the value of a text box rather than the values I have submited via sendkeys for the email address, subjectline, and message text.
Your help is greatly appreciated.
Regards, Jeremy Consider DoCmd.SendObject or Application.FollowHyperLink "mailto:adress@domain?subject=wibble&body=text "
2 questions about this...
Using the Application.FollowHyperlink can you bind the email address,
subject, and body to a control on your form?
The DoCmd.SendObject command works wonders at home where I developed
it, it automatically sends email exactly how I want it. However, to my
demise,at work the function does absolutly nothing. We use an exchange
server at work (which is where I want to use this). Might this
(exchange server) have something to do with why the DoCmd.SendObject
does not work?
The Application.FollowHyperlink alternative approach works fine at my
work, the only problem as notated above is that I would like to bind
the email, subject, and body to a control on the form. Any
suggestions?
Regards,
Jeremy
Thanks,
Jeremy sl********@hotmail.com (Mr. Bungle) wrote: I would like to send email automatically via a command button.
See the Access Email FAQ at my website.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at http://www.granite.ab.ca/accsmstr.htm
Mr. Bungle wrote: Trevor Best <nospam@localhost> wrote in message news:<40***********************@auth.uk.news.easyn et.net>...
Consider DoCmd.SendObject or Application.FollowHyperLink "mailto:adress@domain?subject=wibble&body=text "
2 questions about this...
Using the Application.FollowHyperlink can you bind the email address, subject, and body to a control on your form?
The DoCmd.SendObject command works wonders at home where I developed it, it automatically sends email exactly how I want it. However, to my demise,at work the function does absolutly nothing. We use an exchange server at work (which is where I want to use this). Might this (exchange server) have something to do with why the DoCmd.SendObject does not work?
No, SendObject uss your mail client, it doesn't give a hoot what your
mail server software is.
The Application.FollowHyperlink alternative approach works fine at my work, the only problem as notated above is that I would like to bind the email, subject, and body to a control on the form. Any suggestions?
(assumed textbox names)
Application.FollowHyperLink "mailto:" & txtAddress & "?subject=" &
txtSubject & "&body=" & txtBody
--
Error reading sig - A)bort R)etry I)nfluence with large hammer This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mr. Bungle |
last post by:
I would like to send email automatically via a command button. I have
accomplished this just fine through the following code: (Outlook
should already be open for reliable results)
Private Sub...
|
by: StuartD |
last post by:
I have developed an Access database and wish to e-mail a form to a
central address advising of changes etc.
Have the form and command button the form with a macro behind using
SendObject command....
|
by: RBohannon |
last post by:
I need to create a report in MS Word populated with data from A2K. I
have been asked to create the report in Word so that parts of it can be
edited as necessary later. The data in the report are...
|
by: George |
last post by:
Every time I used the Sendkeys command in my application the "Numlock"
turned off and I couldn't use the keypad to hit numbers......
The old code was:
Private Sub Command1_Click()
SendKeys...
|
by: federico |
last post by:
Hello, how can I make a program respond to another program's input request?
For example, this code:
Process.Start("unrar.exe", "e D:\temp\key.rar D:temp2")
SendKeys.SendWait("test~")
will...
|
by: pigge79 |
last post by:
Hi there,
I've developing an application that translates keystrokes sent from my
TV card remote control to Windows XP Media Center, since the two are
not compatible. I've successfully been able...
|
by: Mac via DotNetMonster.com |
last post by:
Hi all,
I am attempting to send keystrokes to a telnet application I have opened from
my DotNet application. But am having a issue.
In my VB.Net app I firstly open the telnet app using the...
|
by: Spin |
last post by:
Hi,
I am trying to setup a macro that emails out a spreadsheet when activated. When I activate the macro it stops to give me a decision block if I want to send out the email "Yes", "No" or...
|
by: Graycon |
last post by:
I am trying to reboot several devices on my private network through telnet. I wrote a vbs that does the operation but i cannot select any other window while it is running of the input will not go...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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,...
|
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...
|
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...
|
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,...
| |