Checking extention of attachment in Outlook? - VB
Формулировка задачи:
Checking attachments, opening them and saving text into access database. Does anybody knows how?
Решение задачи: «Checking extention of attachment in Outlook?»
textual
Листинг программы
Dim oFolder As MAPIFolder Dim oMailItem As Outlook.MailItem Dim oAttach As Outlook.Attachment Dim sFile As String Set oFolder = oNameSpace.GetDefaultFolder(olFolderInbox) For Each oMailItem In oFolder.Items If oMailItem.Attachments.Count > 0 Then For Each oAttach In oMailItem.Attachments sFile = 'C:Temp ' + oMailItem.Attachments.Item(1).FileName oMailItem.Attachments.Item(1).SaveAsFile sFile 'Then open sFile and read from it and write in db Next oAttach End If Next oMailItem Set oMailItem = Nothing Set oFolder = Nothing
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д