Retrieves public folder name, size in megabytes, and message count for each public folder on an Exchange server and returns this data in a two-dimensional array
obj.GatherPublicFolderData(DataOut Variant, RowCount Long, [TopNN Long]) where obj is an McExchg.PublicFolderAnalyzer object.
DataOut
|
Variant array that contains all public folder information for a server. |
RowCount
|
The number of public folder information rows returned. |
TopNN
|
Specifies that this method should only return rows with the top 'NN' public folders consuming resources, as measured by message count and public folder size. This parameter is optional. |
Boolean.
To retrieve the top 100 public folder using
resources on the EXCHANGE1
Exchange server, enter:
Set obj = CreateObject("McExchg.PublicFolderAnalyzer") If obj.LogonToMapi("EXCHANGE1", "OnePointOperations") Then If obj.GatherPublicFolderData(varData, lngRowCount, 100) Then For lngIndex = 0 to lngRowCount - 1 strPublicFolder = varData(0, lngIndex) lngMBUsed = varData(1, lngIndex) lngMsgCount = varData(2, lngIndex) ' Do something with public folder information Next Else strError = obj.GetError() End If Else strError = obj.GetError() End If'
This example show how to retrieve public folder information.