I need to run through all our mailboxes to see if REPLICATION is turned OFF. (I figure it’s easier then checking for turned ON). I need to grab each mailbox in the MAIL folder and check each individual mailboxes REPLICATION setting. Right now I’m just putting up a prompt box but for those of you more ingenious than me you can give me hints to write to a Notepad file. My issue is even though I am just testing on my mailbox where REPLICATION is turned OFF on it there is nothing prompting me to tell me it is turned OFF.
Here is the code which is basically an example I found in the help with some other code added in.
%REM
Agent Replication On or Off
Created Aug 16, 2010 by
Description: Comments for Agent
%END REM
Option Public
Option Declare
Const MAIL$ = “mail”
Const SLASH$ = ""
Sub Initialize()
Dim session As New NotesSession
Dim directory As NotesDbDirectory
Dim db As NotesDatabase
Dim rep As NotesReplication
Set directory = session.GetDbDirectory( “servername” ) 'Get Directory of Curent Server
Set db = directory.GetFirstDatabase(DATABASE) 'Get the first database
Do While Not (db Is Nothing) ' while there are still databases
If StrLeft(db.FilePath,SLASH) = MAIL Then
Call db.Open(“”,“”)
Set rep = db.ReplicationInfo
’ settig Rep
If rep.Disabled Then
'checking for replication turned on or off
MsgBox(db.FileName) 'present mailbox name
MsgBox(db.Type ) 'present type should be a mailbox
MsgBox (rep.Disabled)
'tell whether it is turned on or off
End If
End If
Set db = directory.GetNextDatabase
Loop
End Sub
Thanks in advance