Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook 2003, is thr' a way to block huge attachments going out.

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I wanted to know if we could let a user know when they hit send, they are sending a huge attachment(s)? VBA code? something? anything?
We are using Exchange, but laptop users are using POP3.

DougP
 
Hi DougP,

I found this link...
I am using 2007 and thus far I cannot get it to warn me of attachments exceeding the size...

I will post back if I get it to work. Perhaps you could try it on 2003?

Peter.

Remember- It's nice to be important,
but it's important to be nice :)
 
Hi again,

It works! I had to add one line to the Function...

oMail.Save

This is so the MailItem has a size attributed to it.

Code:
Private Function ConfirmBigAttachments(oMail As Outlook.MailItem) As Boolean
  Dim lSize As Long
  Const MAX_ITEM_SIZE As Long = 10000 ' Byte
  Dim bSend As Boolean

  bSend = True
  If oMail.Attachments.Count Then
    oMail.Save
    lSize = oMail.Size
   
    MsgBox lSize
    
    If lSize > MAX_ITEM_SIZE Then
'      bSend = (MsgBox("Größe: " & lSize & " Byte. Abbrechen?", vbYesNo) = vbNo)
      bSend = (MsgBox("Item's size: " & lSize & " Byte. Cancel?", vbYesNo) = vbNo)
    End If
  End If
  ConfirmBigAttachments = bSend
End Function

HTH.

Peter.

Remember- It's nice to be important,
but it's important to be nice :)
 
Yes it does work, But it does not pop up on top of everything or my email. I'm Using 2003. I hear the "Bonk" Error beep but have to minimize the current email to see the Error.
Any Ideas how to get it topmost?


DougP
[r2d2] < I love mine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top