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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically set path do default e-mail client at run-time

Status
Not open for further replies.

Perra

Technical User
Dec 28, 2000
38
SE
Hello again!

I just got a helpful tips about opening the default e-mail-program by calling the function Shell("c:\Program\Microsoft Office\Office\outlook.exe")

But what if the user/customer doesn´t have the default mail-client on that "hard-coded" path.

How can you make the application dynamically set the path
for each and every different system??


Is it about creating DLL's or something?

/Perra
Swedish programmer
Swedish programmer
 
If it's the default you are after just do this:-

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


Dim l As Long
l = ShellExecute(0&, vbNullString, "mailto:peter@accuflight.com", vbNullString, vbNullString, vbNormalFocus)

Peter Meachem
peter@accuflight.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top