如何在lotus script中通过RTF域中的文档链接获取该文档?

c104 2006-11-07 10:53:41
例:
在当前文档中有一个RTF域,域中有一个文档链接,在lotus script中通过什么方法可以获得链接所指的文档?

set doc = ???
...全文
165 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
wangjinghui1981 2006-11-08
  • 打赏
  • 举报
回复
用NotesRichTextDocLink这个类,可以获取,可以查一下帮助,以下代码仅供参考

Dim session As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim rti As NotesRichTextItem
Dim rtnav As NotesRichTextNavigator
Dim rtlink As NotesRichTextDocLink
Sub Initialize
Set session = New NotesSession
Set db = session.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
Set rti = doc.GetFirstItem("Body")
Set rtnav = rti.CreateNavigator
If Not rtnav.FindFirstElement(RTELEM_TYPE_DOCLINK) Then
Messagebox "No doclinks in Body item",, "No doclinks"
Exit Sub
End If
Set rtlink = rtnav.GetElement
If rtlink.DocUNID = String$(32, "0") Then
Messagebox "Link does not have a doc component",, _
"No doc"
Exit Sub
End If
Dim linkDb As New NotesDatabase("", "")
If Not linkDb.OpenByReplicaID("", _
rtlink.DbReplicaID) Then
Messagebox "No local replica",, "Cannot find database"
Exit Sub
End If
Dim linkDoc As NotesDocument
Set linkDoc = linkDb.GetDocumentByUNID(rtlink.DocUNID)
Messagebox linkDoc.Subject(0),, "Subject of document"
Exit Sub

535

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧