[Openroad-users] Openroad - Notes Mailing
varghese.mathew at westernpower.com.au
varghese.mathew at westernpower.com.au
Tue Jul 3 16:00:11 EST 2007
Dear All,
I am trying to send a mail with HTML attachment to Lotus Notes 6.51 from
my OpenRoad Application. I want to attach my document to a New Memo
whose Subject and To address to be automatically populated from OpenRoad.
I did the following to send the attachment as an HTML link to the document
and it works fine occationally. Sometimes I get the following error
message
and the Notes session fails to attach my document link due to the
following.
'The method 'import' for source 'missing' returned as error code of
80020009 '
'Document command is not available'
Any help will be much appreciated. Please advise if there is a fix or an
alternative way by calling some Windows APIs.
DECLARE
msg = VARCHAR(50) NOT NULL DEFAULT '';
RtnStatus = INTEGER NOT NULL DEFAULT 0;
current_database = VARCHAR(20) NOT NULL DEFAULT ' ';
subject_line = VARCHAR(200) NOT NULL,
notescall = varchar(1000) not null;
notessession = exc_lotus!NotesSession;
notesdatabase= exc_lotus!NotesDatabase,
notesdocument= exc_lotus!NotesDocument,
notesview = exc_lotus!NotesView;
notesRichTextItem = exc_lotus!NotesRichTextItem,
notesws = exc_lotus!NotesUiworkspace;
uidocument = exc_lotus!NotesUIDocument,
send_to = varchar(100);
file_handle = INTEGER NOT NULL,
current_time = date not null,
notes_dbname = VARCHAR(100) not null
ENDDECLARE
BEGIN
//email_address = 'Varghese.Mathew at westernpower.com.au';
//file_name = 'c:\jvmr\jvcentre.htm';
file_name = HC_DOUBLEQUOTE + file_name + HC_DOUBLEQUOTE;
IF email_address = ''THEN
message 'No Email Address has been supplied';
RETURN FAILURE;
ENDIF;
subject_line = 'SCADA AUTOMATION FORM FOR PROJECT ' +
obj.work_request + 'DMS#' + varchar(dms_number);
file_handle = 0;
file_handle = FindWindowExA(0,0,'NOTES',NULL);
IF file_handle = 0 Then
Curframe.Infopopup('Notes is not responding. Please ensure
that Notes is running');
RETURN FAILURE;
EndIf;
Cursession.DbmsErrorPrinting = EP_OUTPUT;
uidocument = notesws.composedocument(,,'Memo',,1);
send_to = 'Entersendto';
uidocument.fieldsettext(send_to,email_address);
uidocument.fieldsettext('subject', subject_line);
uidocument.GotoField('Body');
uidocument.import('HTML', file_name);
RETURN SUCCESS;
END;
Thanks in advance,
Varghese Mathew
Contract Analyst
IT&T Group
Finance Division
Western Power - 363 Wellington Street Perth WA 6000
T: 08 93266774 | M: 0425807434 | E: varghese.mathew at westernpower.com.au
safe reliable efficient
========================================================================
Electricity Networks Corporation, trading as Western Power
ABN: 18 540 492 861
TO THE ADDRESSEE - this email is for the intended addressee only and may contain information that is confidential.
If you have received this email in error, please notify us immediately by return email or by telephone.
Please also destroy this message and any electronic or hard copies of this message.
Any claim to confidentiality is not waived or lost by reason of mistaken transmission of this email.
Unencrypted email is not secure and may not be authentic. Western Power cannot guarantee the accuracy, reliability,
completeness or confidentiality of this email and any attachments.
VIRUSES - Western Power scans all outgoing emails and attachments for viruses, however it is the recipient's responsibility
to ensure this email is free of viruses.
========================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20070703/cb8127e9/attachment.html
More information about the Openroad-users
mailing list