| | Awarded by Microsoft: |  |
| | VBOffice Info | | Visitors | 537778 | | Impressions | 2242543 |
| |
|
| |
| Author: Michael Bauer | Homepage | | Date: 18.01.2006 | Accessed: 10637 | | | | Description
This sample checks an e-mail's size before sending. You can cancel if it exceeds a pre-determined size. |
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If TypeOf Item Is Outlook.MailItem Then
Cancel = Not (ConfirmBigAttachments(Item))
End If
End Sub
Private Function ConfirmBigAttachments(oMail As Outlook.MailItem) As Boolean
Dim lSize As Long
Const MAX_ITEM_SIZE As Long = 10000
Dim bSend As Boolean
bSend = True
If oMail.Attachments.Count Then
oMail.Save
lSize = oMail.Size
If lSize > MAX_ITEM_SIZE Then
bSend = (MsgBox("Item's size: " & lSize & " Byte. Cancel?", vbYesNo) = vbNo)
End If
End If
ConfirmBigAttachments = bSend
End Function
|
| | |
| | |  | With Category Manager you get all of your categories in a side-bar, a reminder service, synchronized with a central category list and much ... [more] |
| | |  | VBOffice Reporter calculates the sum of values from tasks, appointments, and journal entries with just a few clicks. These reports may be filtered, grouped, and exported into an Excel ... [more] |
| | |  | OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or ... [more] |
| |
|