Lotus Notes <=> Perl question

Hello,

I’m looking for help with interfacing Notes with Perl via COM (Win32::OLE package). I know how to perform basic operations (like opening a database, getting a document handler, getting an item value, etc.). What I have problems with (actually also pretty basic operations) is creating a doclink in a document (either created in Perl script, or received from a database) and setting the value of a multiple-value field to an array.

I don’t want to overload this post with details, but if somebody’s been there and done that I will be happy to provide specifics.

Thank you,

Alexander

Subject: Some answers…

Creating a doclink is a matter of calling AppendDocLink from the rich text item in your document passing in the var that holds a reference to the target document.

my $body = $doc->CreateRichTextItem(‘Body’);

$body->AppendText('Link to Doc: ');

$body->AppendDocLink($refDoc,‘Link to referenced document’);

I can’t remember setting any multi-value fields in perl. I’ll look around to see if I can find any examples.

Subject: Nah, does not work for me …

Jeff, thank you for the answer. I have done this before (because it is what one supposed to do). Unfortunately, does not work for me.

I’m using ActivePerl 5.10.1 Build 1007 (64-bit)with ActiveState Komodo 5.2. When I’m running the script in the debugging mode, I’m getting no messages but the mail arrives without the link. When I’m running without debugger, I’m getting the following messages:

Win32::OLE(0.1709) error 0x80010105: “The server threw an exception”

in METHOD/PROPERTYGET "AppendDocLink" at D:\Rehovot_HotFix\GenerateHotFix_proc.pl line 55

Here is the “offending” line:

$rtItem->AppendDocLink($docHandle,‘HotFix document ->’);

My understanding of COM is not sufficient to understand the source of the problem and to find a remedy. Any ideas?

PS And, yes, I have gooogled it but found nothing I could use to solve my problem.