run microsoft word from my form [message #155939] |
Thu, 19 January 2006 15:38 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
fahim140
Messages: 5 Registered: January 2006
|
Junior Member |
|
|
hi all
i want use a button in my datablock that when user press this button microsoft word is ran.
would u plz tell me how can i do that?
thx
|
|
|
|
Re: run microsoft word from my form [message #156872 is a reply to message #155939] |
Sun, 29 January 2006 03:12 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
awan
Messages: 9 Registered: September 2005 Location: Riyadh
|
Junior Member |
|
|
HI, this can be handle in different ways.....
one of them is create two buttons and one text item on u'r form..all r non data base
first button is to search u'r word file
second button to open that file in Ms word
and text item to read the path...
code is:
first button code
DECLARE
save_path varchar2(100);
BEGIN
save_path := GET_FILE_NAME
(NULL,
NULL,
'file name (*.DOC)|*.DOC|',
'Enter the name of file',
open_file,
TRUE);
:path:= save_path;
END;
second button code
DECLARE
ARG0 OLE2.LIST_TYPE;
BEGIN
WORD.PAPER := OLE2.CREATE_OBJ('WORD.BASIC');
OLE2.INVOKE(WORD.PAPER,'AppMaximize');
ARG0 := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARG0,:PATH);
OLE2.INVOKE(WORD.PAPER,'FileOpen',ARG0);
OLE2.DESTROY_ARGLIST(ARG0);
END;
I think this will help u
Khurram Awan
|
|
|
Re: run microsoft word from my form [message #166479 is a reply to message #156872] |
Thu, 06 April 2006 10:00 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sandudana
Messages: 48 Registered: March 2006
|
Member |
|
|
Hello,
I am new to forms. I tried to do your example. I created a button on a form with code
DECLARE
ARG0 OLE2.LIST_TYPE;
BEGIN
WORD.PAPER := OLE2.CREATE_OBJ('WORD.BASIC');
OLE2.INVOKE(WORD.PAPER,'AppMaximize');
ARG0 := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(ARG0,'D:\ex1.doc');
OLE2.INVOKE(WORD.PAPER,'FileOpen',ARG0);
OLE2.DESTROY_ARGLIST(ARG0);
END;
I receive the following error: 'identifier WORD.PAPER must be declared'
Who is 'WORD.PAPER'? A variable I have to declare previously?
thank you
daniela
|
|
|
|