A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Attachment file size checker



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 20th 09, 11:09 AM posted to microsoft.public.outlook.program_vba
Jazsnap
external usenet poster
 
Posts: 2
Default 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
Ads
  #2  
Old May 20th 09, 01:08 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default 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

  #3  
Old May 20th 09, 04:57 PM posted to microsoft.public.outlook.program_vba
Jazsnap
external usenet poster
 
Posts: 2
Default 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.
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure Outlook to block 3MB attachment file size? Mark Outlook - Installation 11 January 7th 09 09:54 AM
Delete based on Attachment Size (Item.Size)... [email protected] Outlook and VBA 3 August 27th 07 05:30 PM
way to limit received attachment file size? ArcticRadioOperator Outlook - Installation 1 June 2nd 07 08:29 PM
File attachment size limits Gene Hora Outlook Express 7 August 22nd 06 09:02 PM
attachment more than 50 mb size DOL Outlook - General Queries 2 August 8th 06 09:08 AM


All times are GMT +1. The time now is 08:50 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-2025 Outlook Banter.
The comments are property of their posters.