use strict; use Win32::OLE; use Data::Dumper; ### Skipped everything that worked... my ($FullName, $Extension); my $Notes = Win32::OLE->new('Notes.NotesSession)' or die "Can't start Notes session: $!"; ### (1) ### my $Database = $Notes->GetDatabase('GLOSPK2', 'iddnames.nsf'); my $AllDocuments = $Database->AllDocuments(); ### (2) ### my $Count = $AllDocuments->Count; ### (3) ### print "There are $DocCount documents in the database.\n"; ### (4) ### for ( my $Index = 1; $Index < $Count; $Index++ ) { # do stuff... }