ShellExecute(0, nil, 'http://www.programlama.com', nil, nil, SW_SHOWDEFAULT);
Kod:
Option Compare Database
Option Explicit
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 Function Test()
On Error GoTo Err_Test
'Open file
ShellExecute 0, "Open", "file:///G:\Bulletin Board\UP Billing Flags\UP 1.2 - Health and Safety Plan.doc", "", "", 1
'Print file
ShellExecute 0, "Print", "file:///G:\Bulletin Board\UP Billing Flags\UP 1.2 - Health and Safety Plan.doc", "", "", 0
Exit_Test:
Exit Function
Err_Test:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_Test
End Function