If xMailItem.Attachments.Count > 0 Then
For I = xMailItem.Attachments.Count To 1 Step -1
Set xAttachment = xMailItem.Attachments.Item(I)
xFileType = xFSO.GetExtensionName(xAttachment.FileName)
If InStr(xFileType, Trim(xType)) > 0 Then
xAttachment.Delete //Try
End If
Next I
xMailItem.Save // Try
End If
danielmaximiliano wrote: ↑Sat Apr 25, 2020 4:01 am
Copy Work
Jimmy, do you want to delete all attachments after moving the downloaded files?
because I see that they are still in the inbox
IF cCopyMove = "COPY" .OR. cCopyMove = "MOVE"
IF FILE( cOut + cName )
FERASE( cOut + cName )
ENDIF
// this work
oAttachment:Item( i ):SaveAsFile( cOut + cName )
IF cCopyMove = "MOVE"
// hm ... no Error but seems not to work
oAttachment:Item( i ):Delete()
ENDIF
ENDIF
It was as I thought , an Email contains an attachment, when deleting that attachment you have to save the email again without the .. since the Email container does not know that this attachment was deleted until it is updated.
danielmaximiliano wrote: ↑Sat Apr 25, 2020 10:41 pm
It was as I thought , an Email contains an attachment, when deleting that attachment you have to save the email again without the .. since the Email container does not know that this attachment was deleted until it is updated.
not sure if it "real" work ... size of Outlook.PST still same Size (after compress)
danielmaximiliano wrote: ↑Sat Apr 25, 2020 10:41 pm
you can paste to update code
i have change ":DisplayName" to "FileName" which Name is "save-able"