惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News: Ask HN
Hacker News: Ask HN
C
Cisco Blogs
The Hacker News
The Hacker News
T
Tor Project blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Register - Security
The Register - Security
云风的 BLOG
云风的 BLOG
Simon Willison's Weblog
Simon Willison's Weblog
P
Palo Alto Networks Blog
Vercel News
Vercel News
C
CERT Recently Published Vulnerability Notes
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
M
MIT News - Artificial intelligence
I
Intezer
aimingoo的专栏
aimingoo的专栏
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 热门话题
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
P
Proofpoint News Feed
P
Proofpoint News Feed
B
Blog
T
Threat Research - Cisco Blogs
博客园 - 叶小钗
Recorded Future
Recorded Future
Last Week in AI
Last Week in AI
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
Engineering at Meta
Engineering at Meta
G
Google Developers Blog
PCI Perspectives
PCI Perspectives
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Schneier on Security
Schneier on Security
N
News | PayPal Newsroom
C
Cybersecurity and Infrastructure Security Agency CISA
H
Help Net Security
博客园 - 聂微东
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
GRAHAM CLULEY

博客园 - 风渐寒pro

mysql的1067错误 Sharepoint门户可以干很多事情的 利用 Lotus Notes API 提高自动化测试效率(转) sharepoint2010,I am coming! - 风渐寒pro sharepoint安全性验证无效的一个问题 REST实现原理浅析(转载) 山人自有妙招-sharepoint正式环境不能调试 Sharepoint ListType Id 使用 SharePoint 2007 进行安全性编程(转) sharepoint2010的控制台程序,找不到位于<url>的应用程序 - 风渐寒pro - 博客园 Customizing the Rendering of a Custom SPField (copy from todd's blog) extJS中AsyncTreeNode使用多个loader Sharepoint文档权限审计控制小尝试 又是未写完的IDI Repository模式(转) Oracle和Tomcat端口冲突 实现domino平台上的本地word编辑 转帖:ESB拓扑方案 转载:LOTUS还能活多久
某个domino的word公文本地编辑实现方案
风渐寒pro · 2008-11-24 · via 博客园 - 风渐寒pro

实现步骤:

1,客户端注册NOTES COM控件。(regsvr32 c:\lotus\notes\DOMOBJ.TLB)regsvr32  c:\lotus\notes\nlsxbe.dll

(笔者注:注册domino 的com组件是用的nlsxbe.dll,而不是domobj.tlb.这个让我郁闷了半天.)

2,在公文数据库中,保存一些已经定制好的公文模板。已供新建公文时使用。

3,表单上加入VBScript将附件从服务器拆离到本地,然后起用WORD。(Word的宏安全性设为中)

4,公文模板中,WORD的文档的退出事件中加入VBA代码,实现文件上传到服务器。 (笔者注:见过某个公司的OA是写的关闭时自动保存.)

注:为避免启动COM时出现提示口令输入框,可以通过API制作一个DLL来避开。(笔者注:就是用c api做一个domino的登陆验证filter)

相关代码:

表单上的VBScript代码:

  1. <SCRIPT LANGUAGE="VBScript">
  2. Sub Button1_OnClick
  3.     dim s, dir, db, doc, eo, no, word, worddoc
  4.     Set s = CreateObject("Lotus.NotesSession")
  5.     Call s.Initialize
  6.     Set db = s.GetDatabase("sh_server","intranet\webtemp.nsf")
  7.     Set doc = db.getDocumentByUNID("30C11B03D279463548256C7D000DDD74")
  8.     Set eo = doc.getAttachment("普通公文.doc")
  9.     Call eo.ExtractFile( "C:\Temp\test.doc")
  10.   'Create the Word object:
  11.   Set word = CreateObject("Word.Application") 'Create Word object
  12.   Call word.documents.open( "C:\Temp\test.doc" ) 
  13.   Set worddoc = word.activedocument 'Get a handle for the active document
  14.   word.visible = True
  15.     'Call eo.remove
  16.     'Set ritem = doc.getFirstItem("rtfAttachment")
  17.     'Set no = ritem.EmbedObject(1454, "" , "C:\Temp\test.doc" )
  18.     'Call doc.save(True,False)administrator
  19.     ad
  20.     'MsgBox db.filename + " & " + db.server,, "Databases on " + db.server
  21. End Sub
  22. </SCRIPT>

表单上的按钮代码:

  1. <INPUT NAME="Button1" TYPE="BUTTON" VALUE="编辑正文">

Word模板上的VBA代码:

  1. Private Sub Document_Close()
  2.     ActiveDocument.Save
  3.     Dim s, dir, db, doc, eo, no, word, worddoc
  4.     Set s = CreateObject("Lotus.NotesSession")
  5.     Call s.Initialize
  6.     Set db = s.GetDatabase("sh_server""intranet\webtemp.nsf")
  7.     Set doc = db.GetDocumentByUNID("C47E90193C0E4D3248256C780006A73E")
  8.     Set eo = doc.GetAttachment("普通公文.doc")
  9.     Call eo.Remove
  10.     Set ritem = doc.GetFirstItem("rtfAttachment")
  11.     Set no = ritem.EmbedObject(1454, """C:\Temp\test.doc")
  12.     Call doc.Save(True, False)
  13.     MsgBox db.FileName + " 文件已上传至服务器!& " + db.Server, , "Databases on " + db.Server
  14. End Sub

上述内容还少了一个步骤,用js创建文件流将服务器上的文件下载到客户端本地。