domino中上传控件文件拆离的LS代码

domino中上传控件文件拆离的LS代码

Dim inputAttachment As NotesEmbeddedObject
Dim v_files As Variant

v_files = Evaluate(|@Trim(@Replace(@AttachmentNames;TANGER_OCX_filename;””))|,doc)

For i = 0 To Ubound(v_files)
Set inputAttachment = doc.GetAttachment(v_files(i)) ‘获取文件
If Not inputAttachment Is Nothing Then

Dim url As String
url = session.GetEnvironmentString(“Directory”,True)   ‘路径为\domino\data目录

If Dir$(url+”\AttachmentTemp”,16) =”” Then   ‘判断在url+”\AttachmentTemp”目录是否存在,不存在则值为空,存在则值为AttachmentTemp
Msgbox “不存在”
Mkdir url + “\AttachmentTemp”  ‘在url下面创建一个名为AttachmentTemp的文件夹
url = url +”\AttachmentTemp”
Else
Msgbox “存在”
url = url +”\AttachmentTemp”
End If

Msgbox “文件存储位置:” + url
Msgbox “文件名:” + inputAttachment.Name

Call inputAttachment.ExtractFile(url+”\temp.xls”) ‘将附件存放到指定路径目录下

打赏

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据