I'm trying to find the home server of a replicated public folder. 
I've read and found that I'm searching for the PR_REPLICA_SERVER
property of the folder, which should tell me the home server.  My
problem is in trying to get this property.

The Situation: I have two servers with a folder replicated from
SERVER2 to SERVER1.  The folder is appropriately called "Folder on
SERVER2".  The URL's for the folder and its parent are as follows:

FolderURL =
"http://SERVER1/ExAdmin/my.domain.com/Public%20Folders/Folder%203%20on%20SERVER2";

ParentFolderURL = "http://SERVER1/ExAdmin/my.domain.com/Public%20Folders";

Here's my function:

' Begin Code -------------------

Const HOME_SERVER_PROPERTY_URL =
"http://schemas.microsoft.com/mapi/id/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/PR_REPLICA_SERVER";


Function HomeServer(FolderURL As String, ParentFolderURL As String) As
String
    Dim Conn As New ADODB.Connection
    Dim Rec As New ADODB.Record
    Dim Flds As ADODB.Fields
    
    Conn.Provider = "ExOLEDb.DataSource"
    Conn.Open ParentFolderURL

    Rec.Open FolderURL, Conn, adModeRead

    Set Flds = Rec.Fields
    
    HomeServer = Flds(HOME_SERVER_PROPERTY_URL).Value
    
    Rec.Close
    Conn.Close
    
    Set Fls = Nothing
    Set Rec = Nothing
    Set Conn = Nothing
End Function

' End Code -------------


Does that make sense?  Am I on the right track?  Thanks in advance for
your help!

Joel Cade, MCSD

_________________________________________________________________
List posting FAQ:       http://www.swinc.com/resource/exch_faq.htm
Archives:               http://www.swynk.com/sitesearch/search.asp
To unsubscribe:         mailto:[EMAIL PROTECTED]
Exchange List admin:    [EMAIL PROTECTED]

Reply via email to