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
Private Sub Command1_Click()
    ShellExecute Me.hwnd, "open", "c:a.doc", vbNullString, vbNullString, 3
End Sub
Private Sub Command2_Click()
    Dim WordApp As Word.Application
 
    
 Option Explicit
Option Explicit

 Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
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 lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
 ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

 Private Sub Command1_Click()
Private Sub Command1_Click()
 ShellExecute Me.hwnd, "open", "c:a.doc", vbNullString, vbNullString, 3
    ShellExecute Me.hwnd, "open", "c:a.doc", vbNullString, vbNullString, 3
 End Sub
End Sub

 Private Sub Command2_Click()
Private Sub Command2_Click()
 Dim WordApp As Word.Application
    Dim WordApp As Word.Application
 
    
 Set WordApp = New Word.Application
    Set WordApp = New Word.Application
 WordApp.Documents.Add ("c:a.doc")
    WordApp.Documents.Add ("c:a.doc")
 WordApp.Visible = True
    WordApp.Visible = True
 
 
 Set WordApp = Nothing
    Set WordApp = Nothing
 End Sub
End Sub
