Outlook이 특정 수신 전자 메일에서 포함 된 이미지를 자동으로 추출하고 저장하도록하려면이 문서를 참조하십시오. 여기서는 VBA 코드로이를 실현하는 방법을 알려드립니다.
일부 사용자는 종종 특정 수신 이메일에서 포함 된 이미지를 추출하여 특정 Windows 폴더에 저장해야합니다. 매번 수동으로 수행하는 것은 너무 귀찮습니다. 따라서 많은 사람들이 Outlook이이를 자동으로 수행하도록하는 빠르고 편리한 방법을 배우기를 기대합니다. 이제 여기서 우리는 그러한 방법을 여러분과 공유 할 것입니다.
특정 수신 이메일에서 포함 된 이미지 자동 추출
- 첫째, 평소처럼 Outlook 프로그램을 시작하십시오.
- 그런 다음 평소와 같이 Outlook VBA 편집기를 실행합니다.Outlook에서 VBA 코드를 실행하는 방법".
- 나중에 다음 VBA 코드를 복사하여 "ThisOutlookSession"프로젝트에 붙여 넣습니다.
Public WithEvents objInbox As Outlook.Folder
Public WithEvents objInboxItems As Outlook.Items
Private Sub Application_Startup()
Set objInbox = Outlook.Application.Session.GetDefaultFolder(olFolderInbox)
Set objInboxItems = objInbox.Items
End Sub
Private Sub objInboxItems_ItemAdd(ByVal Item As Object)
Dim objMail As Outlook.MailItem
Dim objAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment
Dim strWindowsFolder As String
Dim i As Long
If TypeOf Item Is MailItem Then
Set objMail = Item
'Specify the emails as per your needs
If objMail.Importance = olImportanceHigh Then
Set objAttachments = objMail.Attachments
'Specify the windows folder
strWindowsFolder = "E:\" & objMail.Subject & Format(Now, "yymmddhhmmss")
MkDir (strWindowsFolder)
'Save all embedded images to the folder
For i = 1 To objAttachments.Count
Set objAttachment = objAttachments.Item(i)
If IsEmbedded(objAttachment) = True Then
objAttachment.SaveAsFile strWindowsFolder & "\" & objAttachment.FileName
End If
Next
End If
End If
End Sub
Function IsEmbedded(objCurAttachment As Outlook.Attachment) As Boolean
Dim objPropertyAccessor As Outlook.PropertyAccessor
Dim strProperty As String
Set objPropertyAccessor = objCurAttachment.PropertyAccessor
strProperty = objPropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001E")
If InStr(1, strProperty, "@") > 0 Then
IsEmbedded = True
Else
IsEmbedded = False
End If
End Function
- 그 후 "애플리케이션 시작" 서브루틴을 클릭하십시오.
- 마지막으로 "F5"키를 클릭하여이 매크로를 트리거합니다.
- 이제부터는 특정 새 이메일이받은 편지함에 도착할 때마다 포함 된 이미지가 다음 스크린 샷과 같이 특정 Windows 폴더에 저장됩니다.
정기적으로 대용량 첨부 파일 정리
Outlook에서 용량이 큰 첨부 파일을 정기적으로 정리하는 것이 좋습니다. 이렇게 하면 Outlook 파일 크기를 적절하게 유지할 수 있습니다. Outlook 파일 크기가 클수록 손상될 가능성이 높아집니다. 아시다시피 PST 파일 손상은 제대로 복구하기가 매우 어렵습니다. 처음에는 받은 편지함 복구 도구를 사용해 보겠지만, 대부분의 경우 효과가 없습니다. 결국 전문적인 도움을 받는 수밖에 없습니다. PST 수리 도구, 같은 DataNumen Outlook Repair, 또는 관련 전문 복구 서비스.
저자 소개 :
Shirley Zhang은 데이터 복구 전문가입니다. DataNumen, Inc.는 다음과 같은 데이터 복구 기술 분야의 세계적 리더입니다. mdf 수정 및 전망 수리 소프트웨어 제품. 자세한 내용은 WWW.datanumen.COM

