如何使用VB脚本在Outlook中移动附件 [英] How to move attachments in outlook with VB script
本文介绍了如何使用VB脚本在Outlook中移动附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以告诉我如何将附件移动到路径C:\ data \ input的文件夹中
i将通过运行脚本将其与我的outlook rules一起使用,之后要导入数据库的SSIS包。谢谢
坚持这个
Item.Move(Session.GetDefaultFolder(olFolderInbox).Folders(Move))
我可以使用这个
Item.Move(c:\ data \ input)
i我在脚本中使用此代码
can someone tell me how to move attachments to a folder at path "C:\data\input"
i will use it with my 'outlook rules' by running a script and after that a SSIS package to import into database. thank you
Stuck with this
Item.Move (Session.GetDefaultFolder(olFolderInbox).Folders("Move"))
can i use this
Item.Move ("c:\data\input")
i am using this code in scripts
Sub MoveMail(Item As Outlook.MailItem)
If Item.Attachments.Count > 0 Then
Dim attCount As Long
Dim strFile As String
Dim sFileType As String
attCount = Item.Attachments.Count
For i = attCount To 1 Step -1
strFile = Item.Attachments.Item(i).FileName
sFileType = LCase$(Right$(strFile, 4))
Select Case sFileType
Case ".csv", ".xls", "xlsx"
Item.Move (Session.GetDefaultFolder(olFolderInbox).Folders("Move"))
GoTo endsub
End Select
Next i
End If
endsub:
Set Item = Nothing
End Sub
推荐答案
(右
(strFile, 4 ))
选择 案例 sFileType
案例 。csv, 。xls, xlsx
Item.Move(Session.GetDefaultFolder(olFolderInbox).Folders( 移动))
GoTo endsub
结束 选择
下一步 i
结束 如果
endsub:
设置项目= 无
结束Sub
(strFile, 4)) Select Case sFileType Case ".csv", ".xls", "xlsx" Item.Move (Session.GetDefaultFolder(olFolderInbox).Folders("Move")) GoTo endsub End Select Next i End If endsub: Set Item = Nothing End Sub
请阅读我对该问题的评论。
看看这里:
VB.NET:
如何:以编程方式在Outlook中移动项目 [ ^ ]
如何:以编程方式保存Outlook电子邮件中的附件 [ ^ ]
VB / VBA:
MailItem.Move方法 [ ^ ]
附件(索引).SaveAsFile方法 [ ^ ]
Attachment.SaveAsFile Method(Outlook 2007) [ ^ ]
Please, read my comment to the question.
Have a look here:
VB.NET:
How to: Programmatically Move Items in Outlook[^]
How to: Programmatically Save Attachments from Outlook E-Mail Items[^]
VB/VBA:
MailItem.Move Method[^]
Attachments(index).SaveAsFile Method[^]
Attachment.SaveAsFile Method (Outlook 2007)[^]
这篇关于如何使用VB脚本在Outlook中移动附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文