Sub Initialize
Dim se As New NotesSession
Dim db As NotesDatabase
Dim curdb As NotesDatabase
Dim serverstr As String
serverstr="oa/servers" ‘指定的服务器
Dim dbaddr As New NotesDbDirectory(serverstr)
Set db =dbaddr.GetFirstDatabase(DATABASE) ‘参数是Type ,这里是database
Dim i As Integer ‘可以获取数据库数量
Dim j As Integer
j=0
i=0
While Not db Is Nothing
‘-----获取指定目录下数据库-------
If Instr(db.FilePath,"oadata")>0 Then
‘Msgbox Cstr(i)+"======="+db.FilePath+"====="+db.FileName
Set curdb = se.GetDatabase(serverstr,db.FilePath)
Forall agent In curdb.Agents
If ( agent.Trigger = TRIGGER_SCHEDULED) And agent.IsEnabled Then
agent.IsEnabled = False
Call agent.Save
End If
End Forall
j = j + 1
Print Cstr(j)+Cstr(db.FilePath)
End If
‘-----获取所有数据库名称、路径等等------
‘Msgbox Cstr(i)+"-----"+db.FilePath+"-----"+db.FileName
i=i+1
Set db = dbaddr.GetNextDatabase()
Wend
Msgbox "success"
End Sub
本文出自 “微博IT” 博客,请务必保留此出处http://5476646.blog.51cto.com/5466646/1642098
原文地址:http://5476646.blog.51cto.com/5466646/1642098