先引用word
Dim wordApp As New Word.Application
Dim wordDoc As New Word.Document
Set wordDoc = wordApp.Documents.Open("c:\file1.doc")
Dim wordApp As New Word.Application
Dim wordDoc As New Word.Document
Set wordDoc = wordApp.Documents.Open("c:\file1.doc")
Dim oWord As Object
Set oWord = CreateObject("Word.Application")
oWord.Documents.Open ("c:\file1.doc")
oWord.Visible = True
Shell "winword.exe c:\file1.doc", vbNormalFocus
Dim retval As Long
retval = Shell("D:\Program Files\Microsoft Office\Office10\winword.exe c:\file1.doc", vbNormalFocus)
Shell "start winword.exe c:\file1.doc"
End Sub
Shell "start winword.exe c:\file1.doc"
app.document.open filename="c:\file1.doc"
app.visible=true
Shell "start c:\file1.doc"
ShellExecute 0, "open", "c:\file1.doc", vbNullString, vbNullString, 3
Private Sub Command1_Click()
Shell "winword.exe c:\file1.doc", vbNormalFocus
Dim retval As Long
retval = Shell("D:\Program Files\Microsoft Office\Office10\winword.exe c:\file1.doc", vbNormalFocus)
Shell "start winword.exe c:\file1.doc"
End Sub