Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I open the default email editor in MS Excel? 2

Status
Not open for further replies.

JensKKK

Technical User
May 8, 2007
119
GB
Well the title says already what I want to do. Ideally I would like to open the default email editor on a computer when a command buten is pressed.

Second question: can I insert the email address in the To field of the email?

Many thanks for reading.
 
Have a look at the Display method of the Outlook.Mailitem object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,

I think I could get it work with Outlook, but I am writing a piece of software that should be of general use (and not everybody is using Outlook, but use Lotus Notes instead ...).

Thanks anyway. I might try to send a email via MS Word that could be an alternative.
 
ok, my bad:

Code:
shell("cmd.exe /c start mailto:email@address.com")


mr s. <;)

 
Genius.

Code worked right out of the box.

Thanks very much.
 
Do you know how to write some text in the Re: and body text?
 
Something like:
Code:
Shell ("cmd.exe /c start mailto:email@address.com?Subject=This is a test")
You might also be able to use:
Code:
Shell ("cmd.exe /c start mailto:email@address.com?Subject=This is a test&body=Test")
to add the body as well. I can't test it at the moment so it's no guarenteed [wink]

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Tried to add the subject. Which worked partially. It displays "This" and then nothing. It looks like the that I have to replace the " " with something. What should I use?

 
using "_" works kind of, but does not look brilliant. Or?

This_is_a_test
 
And this ?
Subject="This is a test"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Subject="This is a test"


Seems not compatible with the shell syntax.

Shell ("cmd.exe /c start mailto:email@address.com?Subject=This is a test&body=Test")
 
Shell ("cmd.exe /c start mailto:email@address.com?Subject=""This is a test""&body=Test")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yeah, I can't even get it to work using Chr(34) now [sad]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Shell ("cmd.exe /c start mailto:email@address.com?Subject=""This is a test""&body=Test")

give a error message. Commandline argument not valid
 
And this ?
Shell ("cmd.exe /c start mailto:email@address.com?Subject=This%20is%20a%20test&body=Test")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV

that is the solution. -> replacing the " " with the % does the trick.

Many thanks
 
mailto uses a url format, try replacing the characters with the hex equivalent:

Shell("cmd.exe /c start mailto:email@address.com?Subject=This%20is%20a%20test")

haven't got the body working yet, though.



mr s. <;)

 
what if you want to mask the e-mail address to where the cell just shows someones name and not the coding?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top