How to open word document directly using ole2 and ole containers

Hello
i am using ole conatiners....in forms 6i. i want o open word document directly when i click a button....
i have tried host....ole but word opens .....i want the document to open at once.....
what should i use /set
plz tell by host command and ole2 as well
its urgent.....
thanks

Try this code, Hope this will work.
declare
item_name varchar2(80) := 'letter';
item_id item;
verb_index_str VARCHAR(20);
verb_index PLS_INTEGER;
verb_cnt_str VARCHAR(20);
verb_cnt NUMBER;
verb_name VARCHAR(20);
loop_cntr NUMBER;
begin
item_id := Find_Item(item_name);
IF Id_Null(item_id)THEN
          message('No such item: '||item_name);
ELSE
verb_cnt_str := Forms_OLE.Get_Verb_Count(item_id);
verb_cnt := TO_NUMBER(verb_cnt_str);
FOR loop_cntr in 1..verb_cnt LOOP
verb_name := Forms_OLE.Get_Verb_Name(item_id,loop_cntr);
-- message(verb_name);
-- message(loop_cntr|| ' '||verb_name);
IF verb_name = 'Open' or Verb_name = '?E?'THEN
EXEC_VERB(item_id,verb_name);
END IF;
     end loop;
end if;
EXCEPTION
WHEN OTHERS THEN
MESSAGE('Error: '||TO_CHAR(SQLCODE)||' '||SQLERRM);
RAISE FORM_TRIGGER_FAILURE;
end;

Similar Messages

  • How to open word document form html container url iam getting internal_error while opening file

    Hi all,
    By using below code i am able to download word document file from html container. But before downloading i need edit these document to add Macro.
    I am unable to open word document.
    CREATE OBJECT G_HTML_CONTAINER
          EXPORTING
            CONTAINER_NAME = 'PDF'.
       CREATE OBJECT G_HTML_CONTROL
          EXPORTING
            PARENT = G_HTML_CONTAINER.
    * Convert xstring to binary table to pass to the LOAD_DATA method
        CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
          EXPORTING
            BUFFER     = LV_CONTENT
          TABLES
            BINARY_TAB = LT_DATA.
    data_tab = LT_DATA ).
    * Load the HTML
        CALL METHOD G_HTML_CONTROL->LOAD_DATA(
           EXPORTING
             TYPE         = 'application'
             SUBTYPE      = 'DOC'
           IMPORTING
             ASSIGNED_URL         = LV_URL
           CHANGING
             DATA_TABLE           = LT_DATA
           EXCEPTIONS
             DP_INVALID_PARAMETER = 1
             DP_ERROR_GENERAL     = 2
             CNTL_ERROR           = 3
             OTHERS               = 4 ).
    * Show it
        CALL METHOD G_HTML_CONTROL->SHOW_URL( URL = LV_URL
          IN_PLACE = 'X' ).
    Before file download i want edit the file for that i am using below class.
    PROXY TYPE REF TO I_OI_DOCUMENT_PROXY.
    by using (get_document_proxy) method  getting proxy .
    call method control->get_document_proxy
    exporting
    document_format   = 'x'
    document_type      = 'Word.Document'
    register_container  = 'x'
    importing
    document_proxy     = proxy
    after these.
    call method proxy->open_document
    exporting
    document_url    = lv_url
    open_inplace    = 'x'
    hear i m getting retcode as INTERNAL ERROR
    can any one suggest me how to open document from html container.
    Thanks and reagards
    jogu yadav

    I got resolution
    Thanks and regards,
    Jogu yadav

  • How to open word document in labview

    Hi,
    I want to open word document in labview,well i have done that.
    I want to display only the page part,don't want any editions,formatting to be done.
    please suggest me solution if any.

    How are you displaying your Word document, have you achieved that already?
    As far as I know, there is only one way to display Word documents and that's through the browser ActiveX interface:
    Using the Microsoft Web Browser control to embed a Word Document in LabVIEW
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • HOW TO OPEN WORD DOCUMENT FROM JAVA???

    hi everyone! Can you please help me to come with this problem? Let me to set my main target I want to achieve:
    1) In my program user should first press a button;
    2) Then already created Word Document should be opened (I DO NOT NEED to open that Word Document in Java or something like JField). Just simply it should be opened as a Microsoft Word Document.
    I DO NEED YOUR HELP! PLEASE HELP ME....!

    Running cmd using the exec is also a windows only solution, there is no "more" or "less" it that solution compared to the rundll.
    Since word is a windows format its pretty obvious that the application is ran under windows platform.
    If you are running on a different platform (maybe using open office you can open word documents, i'm not sure) you might want to use the JDIC library (https://jdic.dev.java.net/) which enables you to open/edit/browse such files using the default viewer/editor/browser of the system you are working on.
    Look at the org.jdesktop.jdic.desktop.Desktop object for these methods.
    You can also find the Desktop object in J2SE6 but its still in beta.

  • How to open Word Document using java?

    Respected Sir/ Madam,
    I am doing my project in Network Security using java. I have to transfer the files from server to the client. Each transferred file should have some of the access privileges such as read, write and exeucte. If the transferred file is a word document means then automatically the client should open Microsoft word and if the file is having Read Permission alone then the save, Save As, cut,copy, paste options in the MS - Word should be disabled. This is similar for all the files that i have transferred. That is if the transferred file is excel, audio, video,txt file the corresponding application should be opened properly. How could I acheive this. If the file is having write permission then if the user clicks the save option then the contents of the file should be saved in the server machine not in the client machine, Could we achieve this???? Can anyone help me regarding this? Please give me your views about this query?

    Respected Sir / Madam,
    Thank you very much for your reply. Could we use Microsoft API inside java program to achieve my doubts?? Could U explain it more????

  • How to open word document from application server?

    hello ,
    I want to open a word document that is placed on the application server.
    the function module 'ws_execute' works fine for displaying documents placed on ur local file system. But if i want to open from application server, what needs to b done?
    i m referring to the following demo program 'SAPRDEMOOFFICEINTEGRATION'
    is this the correct reference or there is some other way to do the same?
    kindly help.
    Regards,
    Roshani

    Hi Roshani,
              The solution is like this.
    1> Execute - this is the solution to your program. The file is generated and put in the Application Server for the data to be sent by some means to the intended Place.
    2> To Display/View - This is for the person (who runs the program) to view if the output generated is correct or not.
             So to accomplish this use the same internal table for both Open Dataset and Gui download.
    Open dataset puts data onto the Application server and Gui_download puts the data onto the Desktop or Presentation server for the user to see the data thats fetched.
    So use them as directed to achieve the desired output.
    Reward Points.
    Thanks,
    Tej..

  • How to open jxl workbook directly using JSP...??

    Dear Friends,
    I have created an object for "jxl.write.WritableWorkbook" in my action class, suppose let's say "objWB"
    now I can write this object to a file using objWB.write(), If I write to a file I am able to open it using FileInputStream
    but I don't have permissions on my client machine
    so is there any way, where I can open it directly using JSP.
    Thanks in advance..
    GP
    Don't think be happy

    Don't think, be happy eh? How can you be happy if you have no capacity to register it?
    In any case, to "open" a document in any web environment, you write the binary data to the response with the correct content-type set. If for example you set the content-type to "application/ms-excel" and on the client computer a program is registered to handle that content type, the document might be opened directly in that application. If there is no application registered to handle the content-type, a download of the file is usually offered.
    Do a google search for popular content-type values. I'm sure you can also find examples on how to output a binary file to the response. You are already almost there, in stead of writing the data to the fileoutputstream, write it to the outputstream of the response object in stead.

  • How to open "word" document

    I had some old Word documents on a Dell laptop that I wanted to view on my iMac.  Using a USB drive, I successfully transferred the files from the Dell to the iMac.  Some of the documents open up normally for viewing, etc.  Others do not.  A Pages box pops up and says the document can't be opened.  These are all Word documents, so I'm puzzled why some will open and others won't.  Is there a way to convert these "problem" documents to jpegs?

    These are old Word documents 1999-2000 mostly.  I only have Word on the laptop.  It's old and I'm planning on "decommissioning" it, if you catch my drift.  As I said, some of them open without any problem, while others do not.  What's a fella to do? :-)

  • We removed Pages from the computer, but now we can't open Word documents directly. The computer keeps bringing up an alert that it can't find Pages to open the document.

    We removed Pages from my husband's computer, but now when he tries to open documents that were created in Word, we can't open them directly, only through the Word Dialogue box. The computer keeps bringing up an alert that it can't find Pages to open the document.

    Select one of the documents. Press COMMAND-I to open the Get Info window. In the Open With panel select Word from the dropdown menu then click on the Change All button. This should fix the problem.

  • How to open word documents

    What app is best for opening a word document?

    The most usable app for opening Word docs is definitely Pages. It is made by Apple and is $10.
    If you simply need to view (and not edit) a Word doc, you can simply email it to yourself. Open the email on your iPhone and tap on the attachment and you will be able to see your document.

  • How to open illustrator file (.ai) using Indesign and save it as XML

    I know how to open a Illustrator file (.ai) in Indesign.
    It would be like :
    1 ) Save your Illustrator file as AI. This Native format is most compatible with InDesign.
    2 )  Go to -> InDesign, click on your document using your  Frame Rectangle tool (the one with the X through it).
    3 )  Fill in the desired size (can be adjusted later).
    5 ) Go to File menu > Place.
    6 )  Find and select the Illustrator file in the window that opens.
    7 ) Click the Open button.
    Adjust size, & position of your image using the Direct Selection tool (white arrow), and the cropping with the Seclection tool (black arrow.
    Now I want to save this file as XML.
    After that,  I say
    1 )  File -> Export
    But this file saves as XML only shows he the root element nothing else.
    Every time , this shows like
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root></Root>
    Nothing is there as contents.
    Can anyone let me know, is it possible to store .AI file as XML.
    My requirement is simple, i want to store the .ai file as XML.
    Some how I am using Indesign to do so . Can any body help.
    Thanks,

    Copy and paste is again seems same as 'Place the file'  , it wouldn't help again.
    Copy( from Illustrator) and paste( it in Indesign) and  later saving\exporting as XML again create the same the XML file with no data . Just a XML structure,
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <Root />
    RRegarding using the FXG and SVG file .. saving these formats to XML does not shows the Co-ordinates in XML formats.
    I do I would like to have the coordinates (x,y) so that later on , if required I can change the coordinates and display the Image or Text in the file. As this is a requirement for business card.
    A

  • How to open Word document in Forms Web Version

    In the Client-Server version of Forms 6i, we open a Word template by executing the Host command like below,
    host('WINWORD.EXE'||' '||ltrim(rtrim(v_new_filename)));
    How do I execute the same in Web version to open the Word template?
    Thanks in advance.

    Hi,
    I have gone thorugh the examples on OTN. Here's my requirements :
    In our case we are opening a Word template file from the server machine, making some changes, and saving it back to the server machine. The name of the template file, the location to be saved is all internally handled by forms. In the client-server version, allthe user does is hit the Save button and close the Word application.
    In the Web version, I can open the template file in the browser from the server. The user makes the changes & is then prompted to save it to his client machine. After that the user closes the browser & then has to click on a save button which moves the file from the client machine to the server.
    This extra process of saving the Word file to the client machine bothers me as the users can make changes/delete the file on their own before hitting the Save button on the form. BTW, I have borrowed the code mostly from the OTN website.
    So is there any way to avoid this step to saving to the client m/c and then moving it to the server. Thanks.
    I am running forms 6i on 9iAS on WIN 2000.

  • How to restrict Firefox to open word document in browser window with href

    How to restrict firefox to open word document from a website link to open in the browser window, instead it should open in native program.
    1.I have tried other website, and have clicked on similar links they are opening word document correctly in native program
    2. MS word document from one specific site is opening in browser causing junk character in place of word document.
    Could you please help on this.

    Thanks for your response...
    But As i said, I have tried with other website on the same browser, there it is opening word document in native program. Also the above mentioned options have been tried earlier.
    I have some questions related to this?
    How is this href link is behaving differently opening in browser for mozilla only. Technically, Can we make it open it native program only? If so, then how?

  • How do I convert a word document into a pdf and then upload it to a web site

    How do I convert a word document into a pdf and then upload it to a web site so people can read it from my
    site with Dreamweaver 4?. How can I do this? Can anyone please help? I'm only a newbie. Thanking you in anticipation.

    First you need to install a means of printing to pdf from word.  I like cutepdf writer ( http://cutepdf.com/Products/CutePDF/writer.asp ).  Once installed you will print the doc in word and under the printer selection you choose pdf.
    Once you have the file you put it in your local site folders and upload it using Dreamweaver.  Be sure to link to it from a page so users can get to it and I would recommend giving the link a target of _black so it will open in a new window (see the properties inspector in DW).

  • Opening Word documents with Appleworks

    I often receive Word documents as email attachments (though my hotmail account). I can download these Word documents to my desktop but when I click on them to open them I get an offer to purchase MS Word (which I do not have). I would like to be able to simply open the Word documents with Apple works--and I am hoping I can just click on them and have that happen automatically. But it doesn't. I have tried opening Appleworks and going into the wordprocessing program and then opening the Word document through that, but it only is successful part of the time. What can I do? I would like to have these Word douments open automatically in Appleworks but every time I click on them (i.e., their icon on my desktop) I get that advertisement from Microsoft asking me to buy Word. Is this ad blocking a normal function of Appleworks that would otherwise allow me to open Word documents with a click? And in any case, how can I proceed?

    The ad for Word is almost certainly being tacked on through or at Hotmail (taglines or adware from Hotmail? Hoodathunk .....) ; it sure isn't coming from AppleWorks or from anything on your own system, unless you have that demo copy of Office still lurking somewhere. I suppose it could come from that, somehow.
    Assuming you can get a clean attachment downloaded to your Desktop from Hotmail, the procedure for having what you want to happen automatically is fairly straightforward and, really, has nothing at all to do with Appleworks. Try the following:
    --> Select (highlight) one of those downloaded .doc files from Word, then
    --> use the Finder's Get Info command (⌘-I). In the window which appears,
    --> see the "Open with" section, and set it to AppleWorks.

Maybe you are looking for

  • How do i find and delete the hidden .trashes folder on my sd card?

    I just recently bought a new canon 600d camera and i also bought a new 16gb sd card for it. I use this camera for videos mostly. My card seems to fill up incredibly quickly and when i empty it, it stills says about 600mb is taken up. I looked it up a

  • Non English characters conversion issue in LSMW BAPI Inbound IDOCs

    Hi Experts, We have some fields in customer master LSMW data load program which can contain non-English characters. We are facing issues in LSMW BAPI method with non-English characters Conversion. LMSW steps read and conversion are showing the non-En

  • ADF Faces: f:subview

    Hi, I have page1.jspx which is master and page2.jspx which is child form. I am trying to load the page2.jspx(which has child table) using suvview tag when add child button is clicked on page1.jspx.But I am getting the error "Access Denied" in page1.j

  • Received an apple id password reset email the night ipod classic was stolen. Coincidence?

    My iPod classic was stolen from my vehicle. The same evening I received an apple id password reset email. Is it possible that the thief initiated the email with just the iPod and maybe my name (as it is on the vehicle registration in my car). There i

  • InDesign crashes during export of images

    Hello, I am writing an ActionScript Extension for InDesign (SDK: Extension Builder 3.4), that exports each pageItem on a page as an image. After the export a hash value is calculated for each image and the bunch of images are beeing uploaded. But in