• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6232
  • Last Modified:

using MAILTO: on machines using Outlook and Outlook Express

i am using this command line in the Shell Exec:

sFinal = sEmail & "&Attach=" & Chr(34) & sAttach & Chr(34)

'sEmail is the email address
'sAttach is the attachment path and filename

ShellExecute 0, "open", "mailto:" & sFinal, "", "", SW_NORMAL

this code works with OUTLOOK, but not OUTLOOK EXPRESS
is there anything (almost) universal that will do the job?

i need it to use the defualt mail program and attach files.

thanks all.
0
kevman63
Asked:
kevman63
  • 4
  • 3
  • 2
  • +1
1 Solution
 
PaulHewsCommented:
This will work with both outlook and outlook express.  It requires the use of the MAPI controls included with VB.

http://www.thescarms.com/vbasic/MapiEmail.asp
0
 
kevman63Author Commented:
thanks PaulHews, but i am looking for a solution that uses the:

ShellExecute 0, "open", "mailto:"

API
0
 
Richie_SimonettiIT OperationsCommented:
IMHO, there is no way you could do that simply calling shellexecute.
Optionally, you could see this excellent free component:
http://www.freevbcode.com/ShowCode.Asp?ID=109
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kevman63Author Commented:
to Richie_Simonetti:

so the

ShellExecute 0, "open", "mailto:" & sFinal, "", "", SW_NORMAL

will not work the same with Outlook and Outlook Express?

the big thing is attaching a file.  and using a variety of mail programs.

someone here is writing a Delphi Mailer, but i was hoping for a solution using the ShellExecute command.
0
 
PaulHewsCommented:
>the big thing is attaching a file.  and using a variety of mail programs.

That should work with the MAPI controls, as I mentioned before.  As long as the mail client is simple MAPI compliant it will work.

I also think the shellexecute will not work with OE.
0
 
Richie_SimonettiIT OperationsCommented:
"....
the big thing is attaching a file.  and using a variety of mail programs
..."
That component does it.

Outlook could use shellexecute nor OE ( and maybe other neither)
Cheers
0
 
kevman63Author Commented:
yeah, that's the part that is the problem (attachments)

thanks for the input... too bad the MAILTO isn't as great as i had heard it was... typical.

how do i split points for you both?
0
 
PaulHewsCommented:
You can post a request at Community Support

http://www.experts-exchange.com/commspt/
0
 
Computer101Commented:
Points reduced so the split can be accomplished.

Computer101
E-E Moderator
0
 
kevman63Author Commented:
split points - you get 1/2
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now