imports word
'打開
dim mwordapp as word.application 'word 應(yīng)用程序
dim mobjdoc as word.document 'word 文檔
dim fullfilename as string '文件路徑
mwordapp = createobject("word.application")
mobjdoc = mwordapp.documents.add(fullfilename)
'關(guān)閉
dim missing as object = system.reflection.missing.value
mwordapp.application.quit()
if not mobjdoc is nothing then
'垃圾回收
system.runtime.interopservices.marshal.releasecomobject(mobjdoc)
mobjdoc = nothing
end if
if not mwordapp is nothing then
system.runtime.interopservices.marshal.releasecomobject(mwordapp)
mwordapp = nothing
end if
'真正釋放word進(jìn)程
gc.collect()
商業(yè)源碼熱門下載www.html.org.cn
新聞熱點(diǎn)
疑難解答
圖片精選