Aug 3

domino文件拆离数据库,放入指定目录 不指定

piikee , 14:29 , 计算机相关 » lotus专区 , 评论(0) , 引用(0) , 阅读(459) , 本站原创 | |
domino文件拆离数据库,放入指定目录的LS代码:

Sub Initialize    
         On Error Goto MsgError
         Dim session As New NotesSession
       Dim doc As NotesDocument
          Dim FilePath As String
          Dim fileNames As Variant
         Dim objEmbed As NotesEmbeddedObject
          
        Set doc=session.DocumentContext
         fileNames=Evaluate("@AttachmentNames",doc)  '获取文档所有附件名称
         filePath=session.GetEnvironmentString("Directory")  '环境变量
         If(Isarray(fileNames)) Then
                 Forall fileName In fileNames
                       filePath=filePath+"\"+fileName
                         Set objEmbed=doc.GetAttachment(filename)
                       Call objEmbed.ExtractFile(filePath)'将文档中的附件导出
                   Call objEmbed.Remove() '删除文档中的附件
           End Forall
       End If
       Exit Sub

MsgError:
        Msgbox "Error:"+Error$+" onLine:"+Cstr(Erl)
End Sub
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]