Results 1 to 2 of 2
2003-09-24, 00:28 #1
- Join Date
- Jun 2001
- New York, New York, Lebanon
- Thanked 1 Time in 1 Post
The Size of the e-mails to download (OL 2000)
<img src=/S/hello.gif border=0 alt=hello width=25 height=29> Loungers
OK I don't know if I am telling the right story here, God knows I need a rest, and a <img src=/S/newbrain.gif border=0 alt=newbrain width=21 height=22> .
Is there a way to detect the size of the e-mail messages that one will need to download prior, or after the download is complete?
OK here is what I want to do:
1) I was to check for new mail. Say there are 500 messages on the server.
2) I want to check the size, in Megabytes, or Gigabytes, of all these 500 messages. So say each message is 1 Megabyte then the answer will be 500 Megabytes.
3) Check the size of all the attachments of these 500 messages, so if each message has one attachment, some times one message may have 9, or 15, or even more, I really can't tell, but for now lets say its one attachment per message and the attachment is 500KB, so the answer will be 500KB * 500 messages = 500*500 KB roughly 250 MB.
This needs to be done via VBA, while I am getting the messages, or before getting them, if there is a way, or after getting them.
TIA, I hope this is clear, but if not, please ask for clarification.
Wassim<img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>
2003-09-24, 04:38 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 94 Times in 90 Posts
Re: The Size of the e-mails to download (OL 2000)
Is this a POP server? You should license a mail control (ActiveX/COM object). There are many out there. This will let you interrogate the mail server directly and do the math. otherwise, you have to wait for each message to pass through whatever collection is built with the NewMail event (not sure I have that name right).
As for parsing attachment size from the total message size, I haven't dug around to figure out how you would do that. Have you examined the properties and methods of the Attachment object?