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");
}
}