i found this fourm very useful and helpfull at the same time...i wish if i can get help in my problem
thanks alot 4 all
========================
i have 2 forms
<font color="blue">form number 1 : it has lots of records and next 2 each records there is a buttun...when user click on it...then it will take the information of that recorde as PDF file and it will open</font id="blue"> <font color="red">Form number 2</font id="red">
<font color="red">then in the form 2 there are [ To, CC,Attach, which the pdf will be in autmatically when user click on the button in form number1, subject, body]</font id="red">
<u>in form 1 i put this code when button pressed</u>
Code: Select all
begin
v_pl_id := get_parameter_list(v_pl_name);
if not id_null(v_pl_id)then
destroy_parameter_list(v_pl_name);
end if;
v_pl_id := create_parameter_list(v_pl_name);
add_parameter(v_pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
lFileName := 'S:\Tara\Contract-System\rpts\contract.rpt'||:block76.contract_num||'.pdf';
add_parameter(v_pl_id, 'DESNAME',TEXT_PARAMETER,lFileName);
add_parameter(v_pl_id, 'DESTYPE',TEXT_PARAMETER,'File');
Add_parameter(v_pl_id,' P_con',TEXT_PARAMETER,(:block76.contract_num));
v_rep_txt := run_report_object('snd_contract',v_pl_id);
:Global.attachment_name := 'S:\Tara\Contract-System\rpts\Contract.rpt'||:block76.contract_num||'.pdf';
call_form('S:\Tara\Contract-system\outlook.fmx');
end;
Code: Select all
:block13.attach := :Global.attachment_name;
Code: Select all
Declare
---procedure send email
objOutlook ole2.obj_type;
objMail ole2.obj_type;
objARG ole2.list_type;
attachment ole2.obj_type;
args ole2.list_type;
begin
objOutlook := ole2.create_obj('outlook.application');
objarg :=ole2.create_argList;
ole2.add_arg(objarg,0);
objmail := ole2.invoke_obj(objOutlook,'CreateItem',objarg);
ole2.destroy_arglist(objarg);
ole2.set_property(objmail,'To',:TO);
ole2.set_property(objmail,'CC',:CC);
ole2.set_property(objmail,'Attach',:Attach);
ole2.set_property(objmail,'Subject',:SUBJECT);
ole2.set_property(objmail,'Body',:BODY);
args:=ole2.create_arglist;
ole2.add_arg(args,attachment);
ole2.invoke(Attachment,'readfromfile',args);
ole2.destroy_arglist(args);
ole2.invoke(objmail,'Send');
ole2.invoke(objmail,'Display');
ole2.release_obj(objmail);
ole2.release_obj(objOutlook);
ole2.release_obj(attachment);
Message('your mail sent successsfully');
Message('your mail sent successsfully');
clear_form;
call_form('S:\Tara\Contract-system\module5.fmx');
exception
when others then
message(SQLerrm);message(SQLerrm);
end;
thanks in advance to all:)
Dream