on error resume next
wrd=CreateObject("Word.Application")
if wrd=nothing then
msgbox "本机没装Word,不能运行本软件“
End
End If
VB.NET如何实现类似的效果?
...全文
4448打赏收藏
用COM引用编程操作Word文档时,怎么样判断处理某些电脑没有装Word软件?
在VB6中,可以用后期绑定的例外处理来判断处理某些电脑没有装Word软件,如 on error resume next wrd=CreateObject("Word.Application") if wrd=nothing then msgbox "本机没装Word,不能运行本软件“ End End If VB.NET如何实现类似的效果?
Could not load file or assembly 'Microsoft.Office.Interop.Word ……
C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.Word\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Word.dll
把这个个库dll拷到程序文件EXE同一文件下仍然报:
Could not load file or assembly 'Microsoft.Office.Interop.Word ……