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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

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