I currently have code to save an attachment if it is an excel file to a certain folder. I am trying to find a way to add the option to save only if the attachment is over a certain size. what can I use to check the incoming attachment size?
Printable View
I currently have code to save an attachment if it is an excel file to a certain folder. I am trying to find a way to add the option to save only if the attachment is over a certain size. what can I use to check the incoming attachment size?
There is a Size property for attachments.
https://msdn.microsoft.com/EN-US/lib.../ff866906.aspx
Code:Option Explicit
Sub attSize()
Dim currItem As Object
Dim oAtt As attachment
Set currItem = ActiveInspector.currentItem
Debug.Print vbCr & currItem.Subject
For Each oAtt In currItem.Attachments
Debug.Print " Display Name: " & oAtt.DisplayName & vbCr & " Size: " & oAtt.Size
Next oAtt
End Sub
Thank you. I figured there was but couldn't get it right.