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

推荐订阅源

CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
L
Lohrmann on Cybersecurity
aimingoo的专栏
aimingoo的专栏
V
V2EX
S
Security Affairs
T
Threatpost
C
CXSECURITY Database RSS Feed - CXSecurity.com
IT之家
IT之家
J
Java Code Geeks
The Register - Security
The Register - Security
U
Unit 42
C
CERT Recently Published Vulnerability Notes
月光博客
月光博客
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
Cisco Talos Blog
Cisco Talos Blog
Project Zero
Project Zero
S
Schneier on Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
DataBreaches.Net
博客园 - 司徒正美
V
Vulnerabilities – Threatpost
T
Tor Project blog
Security Latest
Security Latest
T
The Exploit Database - CXSecurity.com
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
小众软件
小众软件
L
LangChain Blog
Attack and Defense Labs
Attack and Defense Labs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
P
Palo Alto Networks Blog
A
Arctic Wolf
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Cyber Attacks, Cyber Crime and Cyber Security
博客园 - 叶小钗
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 最新话题
MongoDB | Blog
MongoDB | Blog
Webroot Blog
Webroot Blog
H
Hacker News: Front Page
Know Your Adversary
Know Your Adversary
Spread Privacy
Spread Privacy
AWS News Blog
AWS News Blog
Engineering at Meta
Engineering at Meta

博客园 - 风渐寒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创建文件流将服务器上的文件下载到客户端本地。