use strict; use Win32::OLE; use Data::Dumper; my %count; my $Buffer; my $Document; my $DocCount; my $FullName; my $Extension; my $cnt = 1; my $Notes = Win32::OLE->new('Notes.NotesSession') or die "Cannot start + Lotus Notes Session object.\n"; my ($Version) = ($Notes->{NotesVersion} =~ /\s*(.*\S)\s*$/); print "The current user is $Notes->{UserName}.\n"; print "Running Notes \"$Version\" on \"$Notes->{Platform}\".\n"; $cnt = 0; #------------------this section does work correctly------------------- +---------- #my $Database = $Notes->GetDatabase('GBLOSPK01', 'mail\\lbishop.nsf'); #my $AllDocuments = $Database->AllDocuments; #my $Count = $AllDocuments->Count; #print "There are $DocCount documents in the database.\n"; #for (my $Index = 1 ; $Index <= $Count ; ++$Index) { # my $Document = $AllDocuments->GetNthDocument($Index); # $Subject = $Document->GetFirstItem('Subject')->{Text}; # $From = $Document->GetFirstItem('From')->{Text}; # #$Body = $Document->Body(); # if (index($From,"CN=") > -1) { # $From = substr($From,3); # if (index($From,"/OU=") > -1) { # $From = substr($From,0,index($From,"/OU=")); # } # } # if ($Index < 415) { # print "$Index - From: $From - Subject: $Subject\n"; # #print "BODY: $Body\n"; # } #} #------------------this section does not work correctly--------------- +-------------- my $Database = $Notes->GetDatabase('GBLOSPK02', 'iddnames.nsf'); my $AllDocuments = $Database->AllDocuments; my $Count = $AllDocuments->Count; print "There are $DocCount documents in the database.\n"; for (my $Index = 1 ; $Index <= $Count ; ++$Index) { my $Document = $AllDocuments->GetNthDocument($Index); $FullName = $Document->GetFirstItem('FullName')->{Text}; $Extension = $Document->GetFirstItem('Extension')->{Text}; if ($Index < 145) { print "$FullName - $Extension\n"; } }
In reply to Re: Hash problem.
by Anonymous Monk
in thread Hash problem.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |