Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Attachment file size checker (http://www.outlookbanter.com/outlook-vba/90569-attachment-file-size-checker.html)

Jazsnap May 20th 09 10:09 AM

Attachment file size checker
 
Hi,

I'm trying to find a way to display a warning box when users attempt to
send attachments above a certain size. I have found some VBA code to
achieve this from he

http://www.vboffice.net/sample.html?...owitem&lang=en

I can't, however, get it to work, I think this is because we are using
Outlook 2002 (SP3) and this code is incompatible with that version.

After some testing I've found that the line of code:

lSize = oMail.Size

always returns a value of zero. Can anyone point me in the right direction
to amend this code so it works how I want it to. I've not programmed in VB
for years so apologies in advance if this is obvious.

Thanks, Jason

Michael Bauer [MVP - Outlook] May 20th 09 12:08 PM

Attachment file size checker
 


Call oMail.save first, then you can retrieve the Size property.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


Am Wed, 20 May 2009 02:09:07 -0700 schrieb Jazsnap:

Hi,

I'm trying to find a way to display a warning box when users attempt to
send attachments above a certain size. I have found some VBA code to
achieve this from he

http://www.vboffice.net/sample.html?...owitem&lang=en

I can't, however, get it to work, I think this is because we are using
Outlook 2002 (SP3) and this code is incompatible with that version.

After some testing I've found that the line of code:

lSize = oMail.Size

always returns a value of zero. Can anyone point me in the right direction
to amend this code so it works how I want it to. I've not programmed in VB
for years so apologies in advance if this is obvious.

Thanks, Jason


Jazsnap May 20th 09 03:57 PM

Attachment file size checker
 
"Michael Bauer [MVP - Outlook]" wrote in news:g12yzbxfizy9
:



Call oMail.save first, then you can retrieve the Size property.


Thanks for that, I have the script working now. Really appreciate your
help.


All times are GMT +1. The time now is 05:05 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com