【问题标题】:Lotus Notes Agent - extract attachments from a Lotus Document to Domino Server File SystemLotus Notes 代理 - 从 Lotus 文档中提取附件到 Domino 服务器文件系统
【发布时间】:2021-12-16 22:11:45
【问题描述】:

我需要从文档中提取附件到 Domino 服务器的文件系统 (/tmp/)。 Domino 服务器在 Aix 1.6 上。 我使用的方法:

Set ritem = ParmDoc.GetFirstItem("AttachedFiles")
If ( ritem.Type = RICHTEXT ) Then
    ForAll o In ritem.EmbeddedObjects
        Call o.ExtractFile  ( "/tmp/"  )
        Print "2222     
    End ForAll  
End if

抛出的错误:

代理消息:Lotus Notes 错误文本= Notes 错误:无法写入目录。 (/tmp/) Lotus Notes 错误代码= 4005

即使 Lotus Domino 用户对该文件夹具有完全权限,也会发生这种情况。

注意:我可以使用在同一目录中创建文件

strFname = pstrFullPath + "STAFILENAME"  
expfileNum = FreeFile()
Open strFname For Output As expFileNum
Print #expFileNum , strn
Close expFileNum 

谢谢。

【问题讨论】:

    标签: lotus-notes lotusscript agent lotus


    【解决方案1】:

    你从字面上回答你自己的问题......

    我可以使用...在同一目录中创建文件

    您尝试将文件“作为目录”解压缩。只需添加一个文件名,它就会按需要工作:

    Call o.ExtractFile  ( "/tmp/" & o.Source  )
    

    来自“ExtractFile”的documentation

    参数
    路径$

    字符串。您要将提取的文件存储在磁盘上的路径和文件名

    【讨论】:

    • 好的!!!!这完成了....
    • 非常感谢!