以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助] WebBrowser 显示 Word 文档 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=116448) |
||||
-- 作者:zcgmxf -- 发布时间:2018/3/24 22:12:00 -- [求助] WebBrowser 显示 Word 文档 以前一直没问题的,我用的是Word 2003 是不是现在版本太低的问题?类型 WPSdoc 是否有影响?如何解决?
是这个WPS 的问题。老师,现在很多电脑都装有WPS,有什么办法排除WPS的干扰呢?是否可以调用WPS的Dell?或者将wps.doc直接修改成 .doc? Dim web1 As Windows.Forms.WebBrowser web1 = e.Form.Controls("WebBrowser1").baseControl AddHandler web1.DocumentCompleted,addressof WebBrowser1_DocumentCompleted axWebBrowser = Nothing Dim web As Object = e.Form.Controls("WebBrowser1").basecontrol web.Navigate("D:\\Publish\\Project\\RemoteFiles\\新闻图片内容\\" & dr("标题")) Do Until axWebBrowser IsNot Nothing Application.DoEvents Loop \' Document Dim oDocument As object = axWebBrowser.Gettype().InvokeMember("Document", System.Reflection.BindingFlags.GetProperty, Nothing, axWebBrowser, Nothing) Dim oApplication As object = axWebBrowser.Gettype().InvokeMember("Application", System.Reflection.BindingFlags.GetProperty, Nothing, oDocument, Nothing) oApplication.ActiveWindow.DocumentMap = False oDocument.Protect (Password:="123456", NoReset:=False, Type:= _ MsWord.WdProtectionType.wdAllowOnlyReading, UseIRM:=False, EnforceStyleLock:=False) oDocument.saved = True vars("doc") = oDocument [此贴子已经被作者于2018/3/25 11:00:20编辑过]
|
||||
-- 作者:有点甜 -- 发布时间:2018/3/25 17:43:00 -- 1、建议卸载重新安装ms office;
2、然后执行 office.reg 导入注册表。 |