# Re: 请高手救救我吧!!

Posted by yeong huann on March 03, 1999 at 00:23:33:

In Reply to: 请高手救救我吧!! posted by 浮云 on March 02, 1999 at 08:56:38:

: 请问有谁可以告诉我如何将自己写的程式.....来启动如何浏览器,word等程式呢?或是自己的程式......请你们救救我......

1.开起word利用vba
EX:
Private Sub word_pro_Click()
Dim WordObj As Object
Dim msg AS string
Dim File1 AS string
msg = MsgBox("请选择Word档案!", 65, "讯息")
If msg = vbOK Then

filebox.DialogTitle = "开启旧档"
Me.filebox.Filter = "*.doc|*doc"
On Error GoTo exit_2
Me.filebox.ShowOpen
File1 = Me.filebox.FileName
Else
Exit Sub
End If
Set WordObj = CreateObject("Word.Application")
WordObj.Visible = True
WordObj.Documents.Open FileName:=File1
exit_2:

End Sub

2.开启浏览器:
EX:
Public Sub link_web_Click()
Call ShellExecute(Me.hWnd, "open", "http://www.Autodesk.com", "", "", SW_SHOWMAXIMIZED) '开启指定网址
End Sub

Follow Ups: