Home » Developer & Programmer » Forms » run microsoft word from my form
icon5.gif  run microsoft word from my form [message #155939] Thu, 19 January 2006 15:38 Go to next message
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 #155953 is a reply to message #155939] Thu, 19 January 2006 19:21 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Search this forum for 'microsoft word' and you will find http://www.orafaq.com/forum/m/152397/67467/?srch=microsoft+word#msg_152397.

David
Re: run microsoft word from my form [message #156872 is a reply to message #155939] Sun, 29 January 2006 03:12 Go to previous messageGo to next message
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 messageGo to next message
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
Re: run microsoft word from my form [message #170877 is a reply to message #166479] Fri, 05 May 2006 13:00 Go to previous message
Mohannad
Messages: 47
Registered: January 2006
Location: palestine
Member

hi :
did u find the true code if u do that send to me plz
all the best
Previous Topic: property rest on item disable
Next Topic: To make Forms as Web based Application (oracle 9i)
Goto Forum:
  


Current Time: Fri Sep 20 06:27:08 CDT 2024