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

x
?
Solved

E-mail and Wed links

Posted on 1999-07-04
4
Medium Priority
?
236 Views
Last Modified: 2010-05-02
Hello

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

0
Comment
Question by:ChristianJ
[X]
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
4 Comments
 

Author Comment

by:ChristianJ
ID: 1521807
from a visual basic application??
0
 
LVL 2

Accepted Solution

by:
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
    Else
        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: "mailto:folk@popmail.com", and the system will open the default mail program, ex.: WebLaunch "mailto:folk@popmail.com", and for URL: WebLaunch "http://www.winamp.com".

If you need more help, just ask...

- Vidar Braut Haarr
  AmigoSoft Productions
  folk@popmail.com
0
 
LVL 2

Expert Comment

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

- Vidar Braut Haarr
  AmigoSoft Productions
  folk@popmail.com
0
 

Author Comment

by:ChristianJ
ID: 1521810
GREAT!!

Thanks!

/ChristianJ
0

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