I'm looking at accessing my Lotus Notes Datebook through perl and would like to know how I can visualize the document structure of an appointment (i.e. show all its attributes and their respective values).
Is there a ready-made function to do this
The (fully functional) code I'm currently using is the following, which finds a number of appointments in my calendar and prints their titles:
I'm just hoping I don't have to write code to individually check every one of the attributes in these tables the same way as with the subject attribute above. (Not to mention possible multivalue and/or structured attributes... do they use those in Notes?)#!/usr/bin/perl -w use strict; use Notes::OLE; use vars qw( $SERVER ); $SERVER=''; # leave empty if querying local client my $mailfile='mail\myshortname.nsf'; my $maxdocs=50; # 0=all my $maxshowdocs=5; my $db = $S->GetDatabase($SERVER, $mailfile); my $docs=$db->Search( "Form = \"Appointment\"" , $DT, $maxdocs); # "Ap +pointment"(calendar) or "Memo"(email) my $count = $docs->Count; print "found ",$count," docs.\n\n"; # show the appointments' titles for(my $i=1; $i<=$maxshowdocs and $i<=$count ;++$i){ my $doc=$docs->GetNthDocument($i); if($doc->HasItem('Subject')){ print $doc->GetFirstItem('Subject')->{Text},"\n"; }else{ print "No Subject\n"; } }
Thanks for any suggestions!
Michael
Update: added clarification on "mailbox documents" and on first sentence.
In reply to Notes::OLE: Doc-Dumper? by mhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |