How can a get a list of pages in a database ?
unto
How can a get a list of pages in a database ?
unto
Subject: how to get a list of pages in a database ?
Sub WhateverDim s As NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Dim doc As NotesDocument
Dim id As String
Dim pageNames() As String
Dim i As Integer
Set s = New NotesSession
Set db = s.CurrentDatabase
Set nc = db.CreateNoteCollection(False)
nc.SelectPages = True
Call nc.BuildCollection
Redim pageNames(nc.Count - 1)
id = nc.GetFirstNoteId
If id = “” Then
Exit Sub
End If
Set doc = db.GetDocumentByID(id)
Do Until doc Is Nothing
pageNames(i) = doc.GetItemValue("$Title")(0)
id = nc.GetNextNoteId(id)
i = i + 1
If id = "" Then
Exit Do
End If
Set doc = db.GetDocumentByID(id)
Loop
'Do something with pageNames
End Sub
Subject: RE: how to get a list of pages in a database ?
THX, must have been blind finding that not in the help ![]()