View Single Post
  #5  
Old September 4th 07, 07:42 AM posted to microsoft.public.outlook.program_addins
MON205
external usenet poster
 
Posts: 31
Default How can I get the active pst size mounted in outlook ?

In your add-in, you have the "Outlook::_Application", from this point, use
the sequence below:
Outlook::_NameSpacePtr pMapi = spApp-GetNamespace( _bstr_t( "MAPI" ) );
_FoldersPtr pFoldersCollection = pMapi-get_Folders( & pFoldersCollection );
MAPIFolderPtr pFolder = NULL;
BSTR bstrStoreID;
long lFoldersCount = pFoldersCollection-GetCount( );
pFolder = pFoldersCollection-GetFirst( );
// Loop for PST's
for( long lIndex = 0; lIndex lFoldersCount; lIndex++ )
{
pFolder-get_StoreID( & bstrStoreID );
pFolder = pFoldersCollection-GetNext( );

// Here you have the StoreID for this PST
// Use the code in the web site I sent you to get the PST file path from
// thisStoreID
// Now after you have the file path, let it be strPSTFilePath
// Call OpenFile, then GetFileSizeEx, and don't forget calling
CloseHandle()
// to close the file handle
}

.... I hope this helps you

"KAKA" wrote:

Hi, MON205, could you please give me a farther guide ? I'm in emergency. And
anybody could answer my question ?

"KAKA" wrote:

Hi, I had a question. How can I get the active pst size mounted in outlook ?
Using vbscript or add-in. I tried to get the size , but there is no such
parameter. Thanks.

Ads