Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Forall view In db.Views
Forall vc In view.Columns
Call TestForSubject(vc)
End Forall
End Forall
End Sub
Sub TestForSubject(vc As NotesViewColumn)
If vc.IsField Then
If vc.ItemName = "Subject" Then
Messagebox "Subject is column " & vc.Position,, _
vc.Parent.Name
End If
End If
End Sub
Private Sub ViewColumnParent_Click()
Dim s As New NotesSession
s.Initialize
Dim dir As NotesDbDirectory
Dim db As NotesDatabase
Dim v As NotesView
Dim vc As NotesViewColumn
Set dir = s.GetDbDirectory("")
Set db = dir.OpenDatabase("Web test")
Set v = db.GetView("Main View")
Set vc = v.GetColumn(1)
MsgBox vc.Parent.Name, , "Name of parent view"
End Sub