VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Create Email in default client / Open URL

John 'Hemo' Hiemenz  ()   Internet/HTML   Visual Basic 3.0   Beginner   Wed 3rd February 2021

Simple calls to open up the default web browser to a given URL or to create an email message in the default email client.

Inputs
' To open a URL - Specify the URL ' OpenInternet Me, "http://www.search.com", Normal ' ' Specify Email Address and Subject ' OpenInternet Me, _ ' "mailto:[email protected]?SUBJECT=Hello World", Normal

Assumes
' I am NOT the original author of this code, but posting ' it because I haven't found this type of implementation ' here yet.

Side Effects
' Does not send the Email message - up to you to do that

API Declarations
Option Explicit
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
Public Enum T_WindowStyle
Maximized = 3
Normal = 1
ShowOnly = 5
End Enum

Rate Create Email in default client / Open URL (3(3 Vote))
Create Email in default client / Open URL.bas

Create Email in default client / Open URL Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters