Chris,
       You miss a line "$Document->{'Form'} = 'Memo';" ,and setup the parameter
is a string.

Jeferson Ladeia

my $userid = "XXXXXXX";
my $server = "XXXX/XXXX";
my $Notes = Win32::OLE->new('Notes.NotesSession')or die "Cannot start Lotus
Notes Session object.\n";
my $Database = $Notes->GetDatabase("$server", "mail\\$userid.nsf") or die
"Could not open database.\n";
my $Document = $Database->CreateDocument('WORK') or die "$!: can't create
document";
$Document->{'Form'} = 'Memo';
$Document->{'Body'} = 'Test Message';
$Document->{'SendTo'} = '[EMAIL PROTECTED]';
$Document->{'Subject'} = 'Notes Email Generated with Perl';
$Document->Save(1, 1);


$Document->Send('1');









"Chris Benco" <[EMAIL PROTECTED]> on 13/08/2002 15:55:02
                                                                                
                                                                                
                                                                                


                                                              
                                                              
                                                              
 To:      [EMAIL PROTECTED]                                  
                                                              
 cc:      (bcc: JEFERSON LADEIA/DNBR)                         
                                                              
                                                              
                                                              
 Subject: OLE Send, need syntax help.                         
                                                              








So far so good, script will create the document, populate the fields, and
save it.  Problem, is it then just sits in my drafts folder and I can not
get it to send directly form the script.



use strict;
use warnings;
use diagnostics;
use Win32::OLE;

my $userid = "XX";
my $server = "xxxx/xx";
my $Notes = Win32::OLE->new('Notes.NotesSession')or die "Cannot start Lotus
Notes Session object.\n";
my $Database = $Notes->GetDatabase("$server", "mail\\$userid.nsf") or die
"Could not open database.\n";
my $Document = $Database->CreateDocument('WORK') or die "$!: can't create
document";
$Document->{'Body'} = 'Test Message';
$Document->{'SendTo'} = '[EMAIL PROTECTED]';
$Document->{'Subject'} = 'Notes Email Generated with Perl';
$Document->Save(1, 1);


All works great, but when I try to add this line to send it..

$Document->Send(1);

 I get this error.

Win32::OLE(0.1502) error 0x80020009: "Exception occurred"
    in METHOD/PROPERTYGET "Send" at C:\X\1.pl line 14

Can't figure out hwo to get the message to send.  There is some syntax I'm
missing on how exactly to use to use 'Send' .


Chris Benco



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to