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 12167
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: 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...
|
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,...
|
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...
|
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...
|
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...
|
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |