它说:“以及脚本区域中的以下代码”。但是没有脚本区域。有一棵树包含“文档选择”,“(选项)”,“声明”,“初始化”和“终止”。
答案 0 :(得分:1)
您可以将该代码输入Initialize方法的主体。确保保留选择“初始化”时自动显示的代码,并在中间输入代码
Sub Initialize
Dim session As New notessession
Dim db As notesdatabase
Dim doc As notesdocument
Dim doc2 As notesdocument
Dim view As notesview
Dim noteid1 As String
Dim noteid2 As String
Dim item As notesitem
Dim collection As notesdocumentcollection
Set db=session.CurrentDatabase
Set collection=db.UnprocessedDocuments
Set doc=collection.getfirstdocument
noteid1=doc.NoteID
Forall v In db.Views
If v.isfolder Then
Set doc2=v.GetFirstDocument
While Not doc2 Is Nothing
noteid2=doc2.NoteID
If noteid1=noteid2 Then
Messagebox v.name
End If
Set doc2=v.getnextdocument(doc2)
Wend
End If
End Forall
End Sub