WIN32::OLE and Lotus Notes



I just started playing with WIN32:OLE to automate some Lotus Notes
clean up. I started with the nice code provided by hvanbelle. This
is as far as I got:

use Win32::OLE;

my $server = 'SOMESERVER';
my $database = 'Mail\SOMEFILE.nsf';
my $folder = 'SOMEFOLDER\Reporting';


#connect to the Notes database
my $Notes = Win32::OLE->new('Notes.NotesSession') || warn "Cannot
start Lotus Notes Session object: $!\n";
my $Database = $Notes->GetDatabase($server, $database);

#Fetch contents of the folder
my $Response = $Database->GetView($folder);
my $Count = $Response->TopLevelEntryCount;
my $Index = $Count;

open (OUT, ">$file");

#loop through all emails
for (1..$Count)
{
my $Document = $Response->GetNthDocument($Index--);
my $subject = $Document->GetFirstItem('Subject')->{Text};
my $body = $Document->GetFirstItem('Body')->{Text};
my $date = $Document->GetFirstItem('Delivereddate')->{Text};
my $array_ref = $Document->{'$FILE'};
foreach my $attachment (@$array_ref)
{
if ($attachment)
{
print $attachment . "\t";
#I Think getting the attachment size is pretty important
# I tried a few things
like this:
my $objAttach =
$Document->GetAttachment($attachment);
print $objAttach->{FileSize};
print "\n";
#It Doesn't work
}
}
}

Any Suggestions for getting the file size of a attachment
.



Relevant Pages

  • Re: cannot launch lotus notes
    ... in most cases) It creates a whole bunch of temp files in it's home folder, ... not in the Temp folder like well-behaved and well-written programs should. ... MS-MVP - Windows Setup and Deployment ... > lanuch Lotus notes when I am log onto the domain. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Outlook Connector - how to change the default location (folder) in outlook?
    ... I installed outlook connector, I have two inboxes in outlook (one is ... If I recall correctly, with the Lotus Notes connector, the connector folders ... choose between the connector folder or the personal folder. ...
    (microsoft.public.outlook)
  • customizing preview pane; making global changes?
    ... Right now I seem to have to go in individually into each folder. ... Using Lotus Notes (on a Mac) I was able to double-click on an email, ... edit inside the text field, remove attachments, and then save the ...
    (microsoft.public.mac.office.entourage)
  • Send outlook email through lotus notes
    ... I am trying to set up outlook to work with lotus notes mail. ... the contacts folder has a SMTP type, whereas those in the lotus notes name ...
    (microsoft.public.outlook.installation)
  • Re: Ruby + Lotus Domino oh my!
    ... In my company, we use Lotus Notes, here's how I extract messages from one ... > code up C/Java just to suck the data out of a Notes database. ... If there's no Domino server involved, write a quick LotusScript agent to ...
    (comp.lang.ruby)