Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


E-mail and Wed links

Posted on 1999-07-04
Medium Priority
Last Modified: 2010-05-02

Does anybody know the code for making a link to a website and an e-mail program?

Question by:ChristianJ
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Author Comment

ID: 1521807
from a visual basic application??

Accepted Solution

mannen earned 800 total points
ID: 1521808
Private 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
Private Const SW_SHOW = 5

Public Sub WebLaunch(ByVal URL As String, Optional Browser As String)
    If IsMissing(Browser) Or Browser = Empty Then
        ShellExecute frmMain.hwnd, "open", URL, vbNullString, vbNullString, SW_SHOW
        ShellExecute frmMain.hwnd, "open", Browser, URL, vbNullString, SW_SHOW
    End If
End Function

This will launch the default browser or the specified browser with your URL. If you want to email, use this: "", and the system will open the default mail program, ex.: WebLaunch "", and for URL: WebLaunch "".

If you need more help, just ask...

- Vidar Braut Haarr
  AmigoSoft Productions

Expert Comment

ID: 1521809
Oh, I forgot, In the code it says "frmMain", change that to whatever your forms name... OK?

- Vidar Braut Haarr
  AmigoSoft Productions

Author Comment

ID: 1521810



Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

722 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