on error resume next
set wrd=createobject("word.application")
wrd.Documents.Open "C:\aaa.doc"
wrd.ActiveDocument.Shapes.AddPicture("c:\fbg.gif", , , 100, 100).Select
wrd.Documents.Save
Set wrd = Nothing
if err.number<> 0 then
response.write err.description
err.clear
end if
以上代码想实现在aaa.doc里插入一图片, 在vb里正常,在asp里却不行。为什么?
这一句在ASP中应该是
set wrd=server.createobject("word.application")
吧!
asp里使用 word需要配置安全性,具体参见
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q288/3/67.asp&NoWebContent=1
晕!
在VB里可以用CREATEOBJECT
…………………………
http://www.nuoteware.com
欢迎大家的加盟
…………………………
该是VBScript吧!