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()
Open "c:\新建文档.doc" For Output As #1 '打开一WORD文档
Print #1, "这是用VB新建的文档" '
Close
ShellExecute Me.hwnd, "open", "c:\新建文档.doc", vbNullString, vbNullString, 5
End
End Sub