PC Review


Reply
Thread Tools Rate Thread

Determining the size of a pst file using CDO

 
 
Jill
Guest
Posts: n/a
 
      16th Jun 2005
I am writing an outlook application that stores messages into a PST
file I created. I know that PST files have size limits of about 2GB
and would like to try to manage the size of my file to prevent it from
going over this limit and becoming corrupted. Is there any way I can
programmatically determine the size of a PST file (i.e. a "Personal
Folders" InfoStore)? Or is there a way that I can check the amount of
space left in the file?

I know that it is possible to check the size of the Mailbox InfoStore
using the InfoStore.Fields(PR_MESSAGE_SIZE) function. However, this
does not seem to work with the pst file InfoStore that I have added. I
checked using Outlook Spy, and it seems that the infoStore I created
does not have this property by default.

Any suggestions?

 
Reply With Quote
 
 
 
 
Gary McDonnell
Guest
Posts: n/a
 
      17th Jun 2005
Just a thought here, but why use CDO at all? Why not just read the file size
using a Windows API call?

Gary McDonnell
TurboGeeks


"Jill" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
I am writing an outlook application that stores messages into a PST
file I created. I know that PST files have size limits of about 2GB
and would like to try to manage the size of my file to prevent it from
going over this limit and becoming corrupted. Is there any way I can
programmatically determine the size of a PST file (i.e. a "Personal
Folders" InfoStore)? Or is there a way that I can check the amount of
space left in the file?

I know that it is possible to check the size of the Mailbox InfoStore
using the InfoStore.Fields(PR_MESSAGE_SIZE) function. However, this
does not seem to work with the pst file InfoStore that I have added. I
checked using Outlook Spy, and it seems that the infoStore I created
does not have this property by default.

Any suggestions?

 
Reply With Quote
 
Jill
Guest
Posts: n/a
 
      17th Jun 2005
The problem with using the Windows API to determine the pst file size
is that pst files do not shrink when items are deleted from them. So
if I delete messages from my pst file, there will be free space left in
the file, but the size of the file on disk will be the same as it was
before the messages were deleted. I believe that even though this
space has not been freed on disk, it is free space in the pst file and
will be reused as I store more messages in the pst file. (Let me know
if I am wrong about this!) So I need a CDO (or even MAPI) call to
figure out how much space is actually used in the pst file.

Jill

 
Reply With Quote
 
Jill
Guest
Posts: n/a
 
      17th Jun 2005
The problem with using the Windows API to determine the pst file size
is that pst files do not shrink when items are deleted from them. So
if I delete messages from my pst file, there will be free space left in
the file, but the size of the file on disk will be the same as it was
before the messages were deleted. I believe that even though this
space has not been freed on disk, it is free space in the pst file and
will be reused as I store more messages in the pst file. (Let me know
if I am wrong about this!) So I need a CDO (or even MAPI) call to
figure out how much space is actually used in the pst file.

Jill

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining the Size of a JPG File ? eBob.com Microsoft VB .NET 1 21st Aug 2007 01:36 PM
Determining File Size davidm Microsoft Excel Programming 5 19th Oct 2005 07:34 AM
Determining the size of a file via a URL Jozef Microsoft VB .NET 3 12th Jun 2005 06:17 AM
Determining File Size Jerald Bailey Windows XP Performance 2 3rd Oct 2004 08:46 AM
Determining Size of a File Phil Galey Microsoft Dot NET 2 28th Jun 2004 09:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:58 AM.