Count of email messages

T

T. Valko

Anyone have any ideas on this...

I want to come up with a UDF that returns the number of messages in an email
"folder".

Just some cursory looking around, the problem I see:

The messages aren't stored in a folder but rather in a *.dbx database file
(ie: inbox.dbx). It doesn't look like it's be possible to count the messages
within this *.dbx file. So, what other methods are there to do this?
 
S

SixSigmaGuy

Are you talking about Exchange/Outlook messages? If so, you can simply add
a reference to Outlook and then check the folders through VBA.

I can give more details if you want and provide sample code, assuming I'm
understanding your problem correctly.
 
T

T. Valko

Are you talking about Exchange/Outlook messages?

Yes. Specifically, Outlook Express.
then check the folders through VBA.

The messages aren't in folders, they're in *.dbx files, but, maybe that
doesn't matter?
I can give more details if you want and provide sample code

I would greatly appreciate that.

Here's the path to the file of interest:

C:\Documents and Settings\User\Local Settings\Application
Data\Identities\{long string}\Microsoft\Outlook Express\Inbox.dbx

Basically, I'm looking to create a UDF to be used like this in a worksheet:

=Inbox()

And it returns the number of messages in the inbox file.

=Inbox() = 323

I gotta clean up my inbox!
 
S

SixSigmaGuy

Sorry, I have no experience at all with Outlook Express. I was referring to
the Office version of Outlook. I'll do some investigation, though, and
reply if I find anything.
 
B

Bob Phillips

I think you will be out of luck though Biff, if I recall, OE doesn't have an
OM that is exposed.
 
T

T. Valko

Thanks for the link, Ron.

I see how it can be done but it's not something I want to invest any money
in. Oh well!
 
R

Ron de Bruin

Hi Biff

It is the only program as far as I know that can do this with OE
Not possible to shell OEX (new program) on this moment.
Maybe Steve will add it in a new version (I hope so)
 
H

Héctor Miguel

hi, !
I see how it can be done but it's not something I want to invest any money in. Oh well!

one long (and "bizarre" ?) approach:

- make a copy of yur *.dbx file (i.e.) FileCopy "your.dbx", "your.txt" (just in case)
- open "your.txt" (it could be directly within excel)
- delete/erase/... any cell with (semi)formulae causing errors/phantom external links
{F5} > special... > formulas / error
- count the len of usedrange minus the len of substituting "Date: " (i.e.)
=sumproduct(len(a1:e12912)-len(substitute(a1:e12912,"Date: ","")))/6
Date is case-sensitive and it ends with colon & space

it worked for me (almost exactly) with one or two OE ng-boxes files ;)

hth,
hector.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top