I put in the an action for the memo form.
This script warns that messages over 2mb are too large.
This scrip only warns how about the message size, it doesnt stop the message
from going through.
Dim ws As New notesuiworkspace
Dim uidoc As notesuidocument
Dim doc_size As Double
Dim quota As Integer
Set uidoc = ws.currentdocument
Set doc = uidoc.document
doc_size = doc.size()
'convert attachment size to mb
doc_size = Round(doc_size / (1024^2),1)
quota = 2
If doc_size < quota Then
Msgbox "Your attachment is ok to send. "_
& "The total size is " & doc_size & "mb",MB_ICONINFORMATION,"Attachments"
Msgbox "Your attachment is too large to send. " _
& "The total size is " & doc_size & "mb" _
& "The maximum size allowed is " & quota & "mb",MB_ICONINFORMATION,"Attachments"
This was first published in November 2000