Ask a Question related to PERL Modules, Design and Development.
-
Ben Heyes #1
Win32::OLE Lotus Notes
Hey group,
I am writing some Win32::OLE perl code to rip some data out a lotus notes
database. The interface exposed by lotus varies depending on what tools you
are using to manipulate it, ie lotusscripting has heaps of
methods,properties,objects, and COM/OLE tends to have less.
I have found some details about what is supported where, but none of them
seem to correlate with what works in code.
I would like to be able to move an email message to a different folder but
it looks that PutInFolder() is not available, however, Remove() is (see
below).
Any pointers....?
thanks in advance,
ben
----- code snippet ------
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";
my $Database = $Notes->GetDatabase("", "mail2\HEYEBE.nsf") or die "Could not
open database.\n";
$Database->OpenMail;
my $AllDocuments = $Database->AllDocuments;
my $Count = $AllDocuments->Count;
print "Connected to ", $Database->{Title}, " on ", $Database->{Server};
print "There are $Count documents in the database.\n";
# scrappy code to test stuff
# go to the FIRST folder
$viewname = "FIRST";
my $view = $Database->GetView($viewname);
# get first document and loop
my $Doc = $view->GetFirstDocument;
GetInfo_FromSubject($num, $Doc);
$num = 0;
while ($Doc = $view->GetNextDocument($Doc))
{
$num++;
GetInfo_FromSubject($num, $Doc);
# try and delete / move email number 10 in this folder
if ($num eq 10)
{
# so this one works
#$Doc->Remove(1) or die ("Unable to remove\n");
# but these don't
$Doc->PutInFolder("AAA", 1) or print ("Unable to PutInFolder:
$!\n");
$Doc->PutInFolder("AAA") or print ("Unable to PutInFolder:
$!\n");
}
}
Ben Heyes Guest
-
Lotus Notes to PDF converter
Does anyone know of a way (besides manually) to print an entire Lotus Notes mail file (including folders to a PDF format? Anyone? -
Lotus Notes and Adobe
Hi, I'm working in a Lotus Notes database. I have emails that come into a database with PDF attachments. The PDF files have data in tables. I'm... -
Lotus Notes SQL ODBC
Lucio Just wanted to THANK YOU and let you know that fixed it and administrators were pretty understanding. Again Thanks IHS Ken:D -
ASP.NET vs Lotus Notes
Hi, Probably this is not the right place to submit my question, any way, if someone can help me, i would really appreciate it. My client have... -
Lotus Notes
Hi, I need to know how we can integrate dreamweaver with lotus designer... Please help. Thank you. Ahmad Mustapha Mohd Yahya



Reply With Quote

