Solved

using MAILTO: on machines using Outlook and Outlook Express

Posted on 2002-07-19
10
6,208 Views
Last Modified: 2008-02-01
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
Comment
Question by:kevman63
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 38

Accepted Solution

by:
PaulHews earned 75 total points
ID: 7165568
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
 
LVL 1

Author Comment

by:kevman63
ID: 7165590
thanks PaulHews, but i am looking for a solution that uses the:

ShellExecute 0, "open", "mailto:"

API
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7165807
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
 
LVL 1

Author Comment

by:kevman63
ID: 7165820
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
 
LVL 38

Expert Comment

by:PaulHews
ID: 7165905
>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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7165931
"....
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
 
LVL 1

Author Comment

by:kevman63
ID: 7165947
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
 
LVL 38

Expert Comment

by:PaulHews
ID: 7166147
You can post a request at Community Support

http://www.experts-exchange.com/commspt/
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7170614
Points reduced so the split can be accomplished.

Computer101
E-E Moderator
0
 
LVL 1

Author Comment

by:kevman63
ID: 7170653
split points - you get 1/2
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This very simple solution applies to a narrow cross-section of the "needs to close" variety. In this case, the full message in Event Viewer was in applog, Event ID 1000: Faulting application iexplore.exe, version 8.0.6001.18702, faulting module …
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now