Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Archive file (http://www.outlookbanter.com/outlook-vba/12410-archive-file.html)

Tony WONG April 22nd 06 04:08 AM

Archive file
 
i wish to write a VBA to check the archive file size at each Outlook
startup.

i cannot locate the object of the archive file.

anyone knows about it. Thanks a lot.

tony



Ken Slovak - [MVP - Outlook] April 24th 06 02:47 PM

Archive file
 
There is no size property you could use to find the size of a folder or PST
file from Outlook macro code.

You'd be better off if you know the file path to that PST file to use the
Win32 API or Windows Scripting or some other interface to read the file size
from the file system.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tony WONG" wrote in message
...
i wish to write a VBA to check the archive file size at each Outlook
startup.

i cannot locate the object of the archive file.

anyone knows about it. Thanks a lot.

tony



Tony WONG April 25th 06 02:38 AM

Archive file
 
Thank you for your clarification.

i also think so.

The difficulties to me is that different workstations save pst file at
different places.

anyway, thanks a lot.


"Ken Slovak - [MVP - Outlook]"
...
There is no size property you could use to find the size of a folder or
PST file from Outlook macro code.

You'd be better off if you know the file path to that PST file to use the
Win32 API or Windows Scripting or some other interface to read the file
size from the file system.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tony WONG" wrote in message
...
i wish to write a VBA to check the archive file size at each Outlook
startup.

i cannot locate the object of the archive file.

anyone knows about it. Thanks a lot.

tony





Ken Slovak - [MVP - Outlook] April 25th 06 02:49 PM

Archive file
 
A very sneaky method is to parse out the PST file path from the StoreID
property.

If you look at Item.Parent.StoreID or Folder.StoreID, using a tool such as
OutlookSpy or MFCMAPI it's a binary array. If you view it as text you will
see the file path and name of the PST file embedded in that StoreID.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Tony WONG" wrote in message
...
Thank you for your clarification.

i also think so.

The difficulties to me is that different workstations save pst file at
different places.

anyway, thanks a lot.




All times are GMT +1. The time now is 10:37 AM.

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