Home » Developer & Programmer » Forms » To open word document/excel/pdf from Oracle forms (Forms 6i)
To open word document/excel/pdf from Oracle forms [message #308716] Tue, 25 March 2008 04:52 Go to next message
oracle_me
Messages: 59
Registered: March 2008
Member
Hi ,
I would like to open a word document /excel sheet /pdf from oracle forms.
Can you tell me how to do that.
Re: To open word document/excel/pdf from Oracle forms [message #308757 is a reply to message #308716] Tue, 25 March 2008 06:33 Go to previous messageGo to next message
hany_marawan
Messages: 198
Registered: April 2005
Location: Cairo - Egypt
Senior Member
Try this code

declare
AppID PLS_INTEGER;
begin
AppID := DDE.App_Begin('c:\office\WINWORD.EXE '||file name,DDE.APP_MODE_MINIMIZED);
end;
Re: To open word document/excel/pdf from Oracle forms [message #308947 is a reply to message #308757] Wed, 26 March 2008 01:00 Go to previous messageGo to next message
oracle_me
Messages: 59
Registered: March 2008
Member
Hey Hany ,
thanks a lot.It works!

However for the benifit of others.

The code is :

declare
AppID PLS_INTEGER;
begin
AppID := DDE.App_Begin(<path where you have winword.exe in your system> <path of the document you wish to open>,DDE.APP_MODE_NORMAL);
end;


For eg:

declare
AppID PLS_INTEGER;
begin
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office10\WINWORD.EXE C:\forms\Forms\FORMS_CODE.DOC',DDE.APP_MODE_NORMAL);
end;


thank you Hany once again ! Smile
Re: To open word document/excel/pdf from Oracle forms [message #312224 is a reply to message #308716] Tue, 08 April 2008 04:27 Go to previous messageGo to next message
taofiksadiku
Messages: 1
Registered: April 2008
Location: United Kingdom
Junior Member
Does anyone how to easily open a word document from Oracle Forms Builder?

I'v used the following code:

declare
AppID PLS_INTEGER;
begin
AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\Office10\WINWORD.EXE C:\forms\Forms\FORMS_CODE.DOC',DDE.APP_MODE_NORMAL);
end;

When the button is clicked to open the document, I get the message:
ORA106500:WHEN-BUTTON-PRESSED raised unhandled exception.

Does anyone know the cos of this problem? Pls let me hear from you if you do. Many thanks.

Taofik
Re: To open word document/excel/pdf from Oracle forms [message #312426 is a reply to message #312224] Tue, 08 April 2008 19:35 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 'word'. There are numerous worked examples.

David
Re: To open word document/excel/pdf from Oracle forms [message #312869 is a reply to message #312426] Thu, 10 April 2008 00:11 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

or check the directory of your winword.
Re: To open word document/excel/pdf from Oracle forms [message #320472 is a reply to message #312869] Thu, 15 May 2008 03:55 Go to previous messageGo to next message
Ayam
Messages: 2
Registered: July 2007
Junior Member
For me when I use word file on my local machine it give me error file not found
when I use file on the data base server its open word but empty file with no error please help

Re: To open word document/excel/pdf from Oracle forms [message #320677 is a reply to message #320472] Thu, 15 May 2008 18:38 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
As I said above "Search this forum for 'word'. There are numerous worked examples."

David
Re: To open word document/excel/pdf from Oracle forms [message #336209 is a reply to message #312224] Fri, 25 July 2008 03:48 Go to previous messageGo to next message
saini006
Messages: 9
Registered: July 2008
Location: hyderabad
Junior Member
hello
can you help me
how can i open os file from forms 6i
i want to open os file when button pressed trigger

here i am using some code but i unable to open with this


declare
AppID PLS_INTEGER;
begin
AppID := DDE.App_Begin(:REPORT_LOCATION,DDE.APP_MODE_NORMAL);
end;
Re: To open word document/excel/pdf from Oracle forms [message #339239 is a reply to message #336209] Thu, 07 August 2008 02:23 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Did searching this forum for 'dde app_begin' show you enough examples to your problem?

David
Re: To open word document/excel/pdf from Oracle forms [message #361485 is a reply to message #308947] Wed, 26 November 2008 10:36 Go to previous messageGo to next message
tobi
Messages: 4
Registered: November 2008
Junior Member
Hi It works ok but the excel file is opening in the application server, not in the client browser. Sad

Any body here knows how can i open the excel file in the Client machine?

Thanks for your comments.
Re: To open word document/excel/pdf from Oracle forms [message #361575 is a reply to message #361485] Thu, 27 November 2008 01:00 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Use 'client_ole2'.

David
Re: To open word document/excel/pdf from Oracle forms [message #361729 is a reply to message #361575] Thu, 27 November 2008 18:14 Go to previous messageGo to next message
tobi
Messages: 4
Registered: November 2008
Junior Member
Thanks Could You helpme whith a simple example to open EXCEL from FORMS using client_ole2?
Re: To open word document/excel/pdf from Oracle forms [message #361744 is a reply to message #361729] Thu, 27 November 2008 19:34 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Here's the list:
Working with Excel via OLE2
http://www.orafaq.com/forum/t/72811/67467/
http://www.orafaq.com/forum/m/84230/67467/
http://www.orafaq.com/forum/t/101906/67467/
Merge two cells in Excel using ole2
http://www.orafaq.com/forum/t/77825/67467/
Error closing Excel file generated using OLE2
http://www.orafaq.com/forum/t/77351/67467/
How to wrap text in excel cell using ole2
http://forums.oracle.com/forums/thread.jspa;jsessionid=8d92200830d62336f40f5aad44efb36ee981f4e6c19e.e34QbhuKaxmMai0MaNeMb3eKb390?mess ageID=1242535&#1242535
Excel via DDE
http://www.orafaq.com/forum/m/260061/67467/#msg_260061
Import from Excel
http://www.orafaq.com/forum/mv/msg/32353/86299/67467/#msg_86299
Forms to Excel example with webutil
http://forums.oracle.com/forums/thread.jspa?messageID=1430799
Another Forms to Excel example
http://www.orafaq.com/forum/t/81537/67467/
How to kill EXCEL.exe from Task Manager from Oracle Forms
http://www.orafaq.com/forum/t/88643/67467/
how do i display all excel worksheets name in form
http://www.orafaq.com/forum/t/89775/67467/
More Excel stuff
http://www.orafaq.com/forum/t/90502/67467/
To run an excel macro
http://www.orafaq.com/forum/t/47685/67467/
Worked example for using Excel through ODBC
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:4406709207206#18830681837358
create excel chart in form6I/How to SetSourceData into excel.chart in form6i
http://www.orafaq.com/forum/t/99738/67467/
Call Excel file from Forms
http://www.orafaq.com/forum/t/121433/67467/

Ole2 data from database to word document
http://www.orafaq.com/forum/t/80617/0/unread/67467/#msg_233229
On why we should use alternate formats
http://www.joelonsoftware.com/items/2008/02/19.html

David
Re: To open word document/excel/pdf from Oracle forms [message #426490 is a reply to message #361744] Thu, 15 October 2009 22:49 Go to previous messageGo to next message
rakesh1901
Messages: 12
Registered: November 2007
Location: Vadodara,India
Junior Member
i want to open a word/excel/pdf file using forms 10g which is saved in database server...... so that client can not save that file,can not select its text,and can not do copy paste.
means just read,nothing else.
it doesn't matter that it will open to client machine or on server.
so how can i do this?
Re: To open word document/excel/pdf from Oracle forms [message #426492 is a reply to message #361744] Thu, 15 October 2009 22:51 Go to previous messageGo to next message
rakesh1901
Messages: 12
Registered: November 2007
Location: Vadodara,India
Junior Member
i want to open a word/excel/pdf file using forms 10g which is saved in database server...... so that client can not save that file,can not select its text,and can not do copy paste.
means just read,nothing else.
it doesn't matter that it will open to client machine or on server.
so how can i do this?
we are using MS Windows Server 2003 R2.
Re: To open word document/excel/pdf from Oracle forms [message #428319 is a reply to message #426492] Tue, 27 October 2009 19:14 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Do NOT ask the same question in multiple threads!!

Look in your other thread http://www.orafaq.com/forum/m/425945/67467/#msg_425945

David
Re: To open word document/excel/pdf from Oracle forms [message #580600 is a reply to message #308947] Tue, 26 March 2013 02:05 Go to previous messageGo to next message
sek577
Messages: 3
Registered: March 2013
Location: CHENNAI
Junior Member
Hi,

i need help..

I am using below syntax in oracle 6i.

I am not able to open the file in the folder "New Folder", since it has space in between. how handle it.

Note: i am able to open the files in the root directory.


dde.app_begin('C:\Program Files\Microsoft Office\Office12\excel.exe C:\New Folder\test.xls' ,dde.app_mode_minimized)
Re: To open word document/excel/pdf from Oracle forms [message #580609 is a reply to message #580600] Tue, 26 March 2013 02:33 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to enclose it into double quotes. Though, I'd rather avoid using names with spaces.
Re: To open word document/excel/pdf from Oracle forms [message #580723 is a reply to message #580609] Wed, 27 March 2013 06:42 Go to previous messageGo to next message
sek577
Messages: 3
Registered: March 2013
Location: CHENNAI
Junior Member

Thanks double quotes is working fine.


how to store the worksheet name in the variable using dde package.
Re: To open word document/excel/pdf from Oracle forms [message #584603 is a reply to message #580609] Thu, 16 May 2013 02:31 Go to previous messageGo to next message
katangur.nikethan
Messages: 31
Registered: December 2009
Location: Hyderabad
Member
Hi all,

I need to Open a file which is stored in the Data base Table & the Data type is of BLOB so i am populating the data but i need to display the attachment which is stored in the BLOB file when the button is clicked

I have been using the below code to do so but it's not getting worked

------------------------------------------------------------------

DECLARE

vblob BLOB;
vmime VARCHAR2(30);


BEGIN
select attachment,MIME_TYPE into vblob,vmime
from Table_name_a
where UNIQUE_ID = 16842;--:ITEM_RESULT.DRAWINGNO;

htp.init;
owa_util.mime_header( vmime, false);
-- owa_util.mime_header( 'image/jpeg', false);
-- owa_util.mime_header( 'image/jfif', false);
-- owa_util.mime_header( 'image/gif', false);
-- owa_util.mime_header( 'application/word' , FALSE);-- to read MS WORD doc
owa_util.mime_header( 'application/pdf' , FALSE);-- to read ADObE

message ('attachment type is' ||vmime);
message ('attachment type is' ||vmime);
owa_util.http_header_close;
wpg_docload.download_file(vblob);


exception
when no_data_found then
dbms_output.put_line('1. attachment type is' ||vmime);
-- NULL;
end;
-------------------------------------------------------------------

so if any body has any idea Please let me Know,it's Much Urgent for me.

Hope for the Earliest Reply.

Thanks & Regards
K Nikethan Reddy


Re: To open word document/excel/pdf from Oracle forms [message #665209 is a reply to message #308947] Sat, 26 August 2017 00:19 Go to previous message
syedferhat
Messages: 17
Registered: February 2013
Location: Karachi, Pakistan
Junior Member
Hi
I had readout your post its great but I am still confuse can , I would like complete example to open that document and save it to my oracle db , while your code only shows how to set the appid variable

appreciate your quick response

Regards
Previous Topic: Dynamically format mask
Next Topic: How to Open Word document and save into table
Goto Forum:
  


Current Time: Thu Mar 28 18:18:59 CDT 2024