【 tulaoshi.com - 编程语言 】
                             
                            我们可以通过Windowsshell.方法使用ShellExecuteAPI函数来加载文档。这个函数将自动的来判断文件的默认打开方式,并用默认的打开方式来开启文档。  
  以下就是ShellExecute函数的声明:  
  PublicDeclareFunctionShellExecuteLib"shell32.dll"Alias_
  "ShellExecuteA"_
  (ByValhWndAsLong,ByVallpOperationAsString,_
  ByVallpFileAsString,_
  ByVallpParametersAsString,_
  ByVallpDirectoryAsString,_
  ByValnShowCmdAsLong)AsLong  
  PublicConstSW_SHOWNORMALAsLong=1
  PublicConstSW_HIDEAsLong=0  
  我们将结合下面的例子来解释该API函数的主要参数的意义。  
  CallShellExecute(Me.hWnd,"Open","c:mypage.html",vbNullString,_
  App.Path,SW_SHOWNORMAL)  
  “hWnd”:表示那个你将要作为父窗体的窗体句柄。  
  “Operatio”:该参数付值为“Open”,表示使用“打开”方法来操作该文档。  
  “File”:该参数表示要操作哪个文件,必须用该文件的完全路径表示。  
  “Parameters”:该参数表示打开文件时的命令行参数。  
  “Directory”:该参数用于指定该应用程序的默认目录。  
  “ShowCmd”:该参数将被设置为“SW_SHOWNORMAL”以打开文档。->