1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
PROCEDURE sauv_pdf ( PC$FileName in Varchar2 )
IS
myapplication client_ole2.obj_type;
mydocuments client_ole2.obj_type;
mydocument client_ole2.obj_type;
args client_ole2.list_type;
Begin
myapplication := client_ole2.create_obj ('Word.Application');
client_ole2.set_property (myapplication, 'Visible', 0);
mydocuments := client_ole2.get_obj_property (myapplication, 'Documents');
args := client_ole2.create_arglist;
client_ole2.add_arg (args, PC$FileName);
mydocument := client_ole2.invoke_obj (mydocuments, 'Open', args);
client_ole2.destroy_arglist (args);
args := client_ole2.create_arglist;
client_ole2.add_arg (args, 'PrintPdf');
client_ole2.invoke (myapplication, 'Run', args);
client_ole2.destroy_arglist (args);
client_ole2.invoke(myapplication,'Quit');
client_ole2.Release_obj (mydocument);
client_ole2.Release_obj (mydocuments);
client_ole2.Release_obj (myapplication);
End; |
Partager