Const C_VIEW = "People" Const C_KEY = "Marvin Martian/IT/SomeCompany" Const C_ITEM = "Fullname" Dim S As NotesSession Dim Db As NotesDatabase Dim View As NotesView Dim Doc As NotesDocument Set S = New NotesSession Set Db = S.CurrentDatabase Set View = Db.GetView( C_VIEW ) Set Doc = View.GetDocumentByKey( C_KEY, True ) If Doc.HasItem( C_ITEM ) Then Print C_ITEM & ": " & Doc.GetFirstItem( C_ITEM ).Text Else Print C_ITEM & " Doesn't exist!" End If #### use constant C_VIEW => "People"; use constant C_KEY => "Marvin Martian/IT/SomeCompany"; use constant C_ITEM => "Fullname"; use strict; use warnings; use Win32::OLE; my $notes = Win32::OLE->new('Notes.NotesSession') or die "Can't open Lotus Notes"; my $db = $notes->GetDatabase(@{&C_DB()}); die "Database was not opened" unless $db->IsOpen; my $view = $db->GetView( C_VIEW ); my $doc = $view->GetDocumentByKey( C_KEY, -1 ); if (defined $doc) { print C_ITEM . ": " . $doc->GetFirstItem( C_ITEM )->Text() . "\n"; } else { print C_ITEM . " Doesn't exist!\n" }