日期:2010-08-09  浏览次数:21015 次

<script language=vbscript>
applpath = Request.ServerVariables("APPL_PHYSICAL_PATH")

on error resume next
Set wdApp = CreateObject("Word.Application")

If Err.Number <> 0 Then
 MsgBox ("Error # " & CStr(Err.Number) & " " & Err.Description)
 Set wdApp = Nothing
 Err.Clear
else
 wdApp.Visible = True
 wdApp.WindowState = 1
end if
</script>

  我希望达到的目的:用asp生成word文件

  我的问题:

    Word不能启动。

    如果去掉第一句话,则可以启动

  解决方式:

applpath = Request.ServerVariables("APPL_PHYSICAL_PATH")

  作为服务端程序处理

Set wdApp = CreateObject("Word.Application")

  作为客户端程序处理