Lotus notes 是否可以在IBM Domino Notes中提取文档中的附件

Lotus notes 是否可以在IBM Domino Notes中提取文档中的附件,lotus-notes,lotus-domino,lotusscript,domino-designer-eclipse,Lotus Notes,Lotus Domino,Lotusscript,Domino Designer Eclipse,是否可以在IBM Domino Notes中提取文档中的附件。我想有效地运行一个脚本,该脚本将提取某些文档中的某些附件。我真的不知道从哪里开始:“(我的一般建议: 打开并搜索您感兴趣的主题 在本例中,在搜索字段中输入“附件”,您将获得点击列表。 七的条目显示“.”。 您将在本文档中找到如何提取附件的说明,包括一个示例 Dim commandResult As Variant Dim attachedFileName As String commandResult = Evaluate({@At

是否可以在IBM Domino Notes中提取文档中的附件。我想有效地运行一个脚本,该脚本将提取某些文档中的某些附件。我真的不知道从哪里开始:“(

我的一般建议:
打开并搜索您感兴趣的主题

在本例中,在搜索字段中输入“附件”,您将获得点击列表。
七的条目显示“.”。
您将在本文档中找到如何提取附件的说明,包括一个示例

Dim commandResult As Variant
Dim attachedFileName As String

commandResult = Evaluate({@AttachmentNames}, currentDoc) 'getting attachment names
attachedFileName = commandResult(0) 'getting the first value from the list of attached names

if attachedFileName = "" then
   MsgBox "There's no attached file in this document", 64, "Note"
   Exit Sub
End If

Set attachedFileObject = currentDoc.Getattachment(attachedFileName) 'getting object with attached file
Call attachedFileObject.ExtractFile( {C:\Temp\} + attachedFileName) 'extracting file to the C:\Temp folder

这里是一个关于堆栈溢出的例子。

有几种方法可以做到这一点。我将描述一种简单的方法

假设
currentDoc
是当前文档(
NotesDocument
实例)。并假设此文档只有一个附件

Dim commandResult As Variant
Dim attachedFileName As String

commandResult = Evaluate({@AttachmentNames}, currentDoc) 'getting attachment names
attachedFileName = commandResult(0) 'getting the first value from the list of attached names

if attachedFileName = "" then
   MsgBox "There's no attached file in this document", 64, "Note"
   Exit Sub
End If

Set attachedFileObject = currentDoc.Getattachment(attachedFileName) 'getting object with attached file
Call attachedFileObject.ExtractFile( {C:\Temp\} + attachedFileName) 'extracting file to the C:\Temp folder

如果您想分离所有迭代于
commandResult
的文件,这些文件将包含所有附加文件的名称。

如果您真的不知道从哪里开始,这里有一条经验法则:从Google开始,而不是从StackOverflow开始

搜索字符串:lotus notes附件示例脚本

命中率#1指LCLSX

别理它

Hit#2是一个IBM帮助页面

好的,这看起来很有希望。它提供了很多信息,但这是独立的参考信息,不是教程。但是看!在页面底部!有一个标记为的链接

这正是你所需要的,这才是真正的出发点