OPENING AND GETTING MS WORD ACTIVE DOCUMENT THROUGH CLIENT_OLE2

I am opening a word document through webutil host command. Now I need to get the active document of the opened word file.
How it is possible?. Since I need to fire Callback trigger 'MY_TRIGGER' I can not define 'Word.Application' and get the
'ACTIVEDOCUMENT'.
DECLARE
PID WEBUTIL_HOST.PROCESS_ID;
app CLIENT_ole2.OBJ_TYPE;
ADOC CLIENT_ole2.OBJ_TYPE;
BEGIN
PID := WEBUTIL_HOST.NonBlocking_With_Callback('D:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE C:\MYWORD.DOC','MY_TRIGGER');
--APP := CLIENT_OLE2.CREATE_OBJ('WORD.APPLICATION');     
--ADOC := CLIENT_OLE2.INVOKE_OBJ(APP,'ACTIVEDOCUMENT');          
END;

hi
i did not get u very well but i am trying to help u.what do u want to achieve?
check this code.
DECLARE
app CLIENT_OLE2.OBJ_TYPE;
docs CLIENT_OLE2.OBJ_TYPE;
doc CLIENT_OLE2.OBJ_TYPE;
selection CLIENT_OLE2.OBJ_TYPE;
args CLIENT_OLE2.LIST_TYPE;
BEGIN
-- create a new document
app := CLIENT_OLE2.CREATE_OBJ('Word.Application');
CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
docs := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Documents');
doc := CLIENT_OLE2.INVOKE_OBJ(docs, 'add');
selection := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Selection');
-- insert data into new document from long item
CLIENT_OLE2.SET_PROPERTY(selection, 'Text', :long_item);
-- save document as example.doc
args := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, 'c:\temp\example.doc');
CLIENT_OLE2.INVOKE(doc, 'SaveAs', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
-- close example.doc
args := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, 0);
CLIENT_OLE2.INVOKE(doc, 'Close', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.RELEASE_OBJ(selection);
CLIENT_OLE2.RELEASE_OBJ(doc);
CLIENT_OLE2.RELEASE_OBJ(docs);
-- exit MSWord
CLIENT_OLE2.INVOKE(app,'Quit');
END;sarah

Similar Messages

  • How do I re-open and get back into my iPhoto if this message appears: "Your photo library is either in use by another application or has become unreadable"? What do I do?

    How do I re-open and get back into my iPhoto if this message appears: "Your photo library is either in use by another application or has become unreadable"? What do I do?

    Rebuild your iPhoto Library:
    iPhoto 6 and later: Rebuilding the iPhoto library

  • How can I open and listen to the PDF documents with audio in my iPad?

    How can I open and listen to the PDF documents with audio in my iPad?

    You need to use a PDF reader that supports multimedia. Adobe Reader 10.3 does not. Adobe has not stated whether it will support multimedia in the future.
    In the meantime, you could buy an application that does like PDF Expert. Read about it here:
    Finding the Best Tablet PDF Reader

  • Can I open and render a local .PHP document?

    I have some .PHP documents on my local harddrive. I have Textmate (a text editor) set as the default application to open these documents. However, I would also like to open and render them in Safari. If I click COMMAND-O in Safari to get a Finder window, I can navigate to my .PHP documents, but I cannot open them because they are grayed out. I can't find any preference that would allow me to open them.
    In Firefox I can open a .PHP document in this way and it will render (albeit somewhat incompletely). Is this functionality absent in Safari?

    This doesn't work for me. I enabled web sharing in system preferences and enabled PHP5 by following the instructions here, but when I try to open a .PHP file in Safari, they are still grayed out in the Finder window.
    Is the idea that I need to drop the .PHP files into the Sites directory and view them through Apache? (I'm hoping to be able to just view them from any directory on the harddrive, the same as I can do with Firefox.)
    Message was edited by: billmcn

  • How to open and show a word, excel, ppt file in Adobe AIR application?

    Dear All,
    I have a requirement to open a MS- word/ Excel file in the AIR application.
    On click of a brows button a file reference box opens...on any file
    selection...it should open in the application itself...
    so plz let me know the solutions u have...

    Here is your basic issue: setting a classpath (and presumably compiling and executing a program) is one of the most basic, fundamental concepts in Java. I would advise you to follow JVerd and Annie's links and get started on a tutorial. Try writing a simple HelloWorld application before delving into POI. When you are more comfortable writing and compiling programs, and post a specific question, it will be much easier to help you.
    - Saish

  • Reg : Viewing Opening and Closing remarks in the document

    Dear All,
    In any document (Sales Quotation, Sales order etc), while right click we can see Opening and Closing Remarks. I have entered Opening and closing remarks. But am not able view in the screen. Where i can view the same in the respective document.
    Please do the needful
    Thanks & regards
    Venkatesh N

    Hi,
    You can check Note No. :    1038129 and 1289493 regarding the question asked by you.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Can I read and write a Word/excel document on an iMac ?

    Will an iMac replace my existing non apple computer?

    Yes.
    You have a number of options -
    A new Mac comes with iWork for free - this includes Pages (Word Processor), Numbers (Spreadsheet) and Keynote (Presentation software) which will import and export Word and Excel files.  You MAY have some issues with formatting and recent version of iWork is rather cut-down.
    If you want maximum compatibility with Word and Excel, there are Mac versions to buy as downloads from Microsoft.
    Finally, there are a couple of rather good free Office suites - Open Office and Libre Office are both well thought of and will handle Word and Excel files - you cansearch for these via Google.
    Hope this helps.

  • Present a dialog screen to the user that always stays open and gets updated with values from teststand.

    Hello,
    I'm new to TestStand and just created my first sequences with TS and LV.
    The program is running fine but now I need to implemented a dialog screen with some progress results for the user.
    This dialog screen must stay open (unless closed by the user) and gets refreshed with the latest analysis results from TestStand.
    Is there an example of something like that. (starting from a working example is always easier)
    So I need a mechanism to give some results from TestStand to a custom made dialog screen in LabVIEW.
    Any thoughts/examples/recommandations ???
    Thanks!

    Hi noxus,
    The basic design you are looking for is a daemon, This is basically a VI that runs in the background (your dialog VI for example). This VI is launched dynamicly when needed. And there should be a way of detecting if the deamon is running.
    You can use various ways of communicating between VI's. The two most use full I find either Queues or TCP. The added bonus for TCP is that it also works over the Network, but could also be slower and blocked by Firewalls. Queues only work within the LabVIEW Process running on the Local machine and provide a nice way of detecting if the daemon VI is running.
    Attached a example that show how you can implement something like this. The 'sent new value.vi' obtains a queue reference, we check if it has created a new queue or if it returned an existing queue reference. If the obtain queue created a new queue this means the daemon is not running and we launch the deamon.vi.
    The daemon also connects to the same queue and maintains the reference. If the deamon is closed the referenced is closed as well and the queue is destroyed.
    You can run the example VI. (in LabVIEW 8.2).
    Hope this helps.
    Thanks
    Karsten 
    Attachments:
    Daemon.zip ‏35 KB

  • HT4623 I'm upgrading to ios 7, and I'm getting a message saying "Your iPhone could not be activated because the activation server could not be reached" I've gotten this now 10 times and have even tried activating it through iTunes which also did not work.

    I am trying to upgrade my phone to iOS 7, I restored it so it would download the new software and now it is telling me that it cannot be activated. How do I get around this?

    unfortunately no, a million people are attempting to update their phones right now, and thus activate them. Patience will have to suffice.
    For the future, I would recommend not updating essential work devices on the launch day

  • Adobe photoshop CS6.Receiving the error "could not complete your request because it is not a valid photoshop document? Tried renaming the files and had working psd files and now all psd files will not open and getting the error listed. Anyone help please?

    Could not complete your request because it is not a valid photoshop document. Tried renaming the file extensions and still no luck.

    Nobody can tell you anything without proper system info or other technical details.
    Mylenium

  • I have only one window open, and get a warning when I exit that "You are about to close multiple tabs."

    I have Firefox 8 for Vista, and according to the "About" screen, Firefox is up to date. I heard this might be a problem with my plugins, so I updated them all. Still a problem. I disabled all my plugins and add-ons and still got the message.

    ONLY 8 people have this problem?
    Look, virtually all Mozilla's potential users are coming from Internet Exploder, which gets this ALMOST RIGHT, while FireF*x does it totally wrong. Including in webmail: there's no way I could have got to this forum without leaving 4 windows active or closing everything, including closing my mail without logging out.
    ONLY 8 PEOPLE? How many thousand simply throw up their hands & uninstall yr f- nurdware over this one single issue? Not to bore you with details, but I'm hardly unsympathetic to open sources that don't look like the best argument for Micros**t and Google hegemony.
    Btw, I said they get it -almost- right... It would be really nice if IE or >somebody< offered a checkbox to NEVER close multiple tabs. Look, if this bug disguised as a feature is useful to a few nurds by all means keep it as an advanced option, but PLEASE set up FireFox so it at least defaults to the real world.

  • How to open and write to a new document from a filter plug in?

    Hi. I'm new to writing photoshop plug in. I would like to copy a small area of the current image, open a new document, and paste the area into the new document. All this is done in photoshop only.
    I am currently using the "Dissolve" filter to do my study, and i can't find the way to create a new document.
    I found a reply by Tom Ruark, mentioning using an automation plug in.
    Can someone please point out to me which functions, and parameters, to study?
    And are there any sample projects that do this?
    Many thanks.
    Regards,
    Yong

    You don't do that from a filter plugin. A filter plugin can only filter existing data.
    Yes, you would need a script or an automation plugin to create a new document.
    You might want to read the SDK about what the various types of plugins can do.

  • HT4528 I am due for an upgrade on 5/23 and I wanted to find out - can I bring my old iphone 4 to the apple store and get a new iphone 5 through the apple store instead of verizon?  Will it cost the same to get the phone as through Verizon?

    I am due for an upgrade on 5/23 and I am trying to find out if I can get my phone through the Apple store?  I have an iphone 4 and am hoping to upgrade to a iphone5.  Just want to make sure if the price is the same as if I went to a Verizon store to upgrad. 

    I don't believe they were looking for a trade in, they are due for a subsidized Verizon upgrade. I think the bringing the iPhone 4 was for setting it up and transferring as Verizon does not require you to swap your previous phone for an upgrade.

  • I am using iwork 09 on my Macbook and have a problem with all documents created in Pages, numbers and keynote.  When I open and one of them every document that has ever been created, even attachements to emails that have long been deleted open up.  Help!

    If anyone can help with this I would be eternally grateful.  I would like to be able to delete a document and not have it keep coming and asking me if I would like to save it.  Even when I take the do not save option it still comes back.  Is it me or the software?
    Thanks
    Bryan

    Peggy
    You are probably correct. I tried all different variations to test it. As long as I quit each document separately, i.e., red dot it, I seem to bring up only one document after that whether I click on the document itself or open it within pages. The same is true with numbers.
    Two more questions:
    1) can you turn off the "resume" feature? If so, how? I could not find a way to do it.
    2) why the "save a version" feature in pages? What happened to the old "save" and "save as" features?
    Thanks so much, you saved me a lot of frustration but I am still going to install MS Office for Mac.
    Daveben

  • Trying to publish to Flickr and get code error 4, document is empty?

    Does anyone have a solution to the question?

    Suggestions mentioned in this article should help. Error changing modules | Lightroom
    ~ Arpit

Maybe you are looking for

  • Benefit and limitation of temp table in sql server 2008

    I have a datagrid in front end of asp.net . when user select a row it shows another gridview (multiple row ) where user have to put some data. when user click CLOSE button  i have to keep all data of 2nd gridview in reference with 1st gridview row id

  • Trying to install the new version 6.0 i'm asked to turn off firefox--but it's not turned on so, help?

    I've been trying to install 6.0...i run it, and do the installation, but at a certain point it will go no further, with a notice: turn off firefox...but i've never turned it on...can't locate it...suggestions?

  • Re: NB200 - Making noise and screen goes blank

    Hi My notebook is making pitched noise and the screen becomes blank. Please help with this issue. Thanks

  • Zip code input to return location

    I am wondering if there is a spry tool that I can use. I want the user to input one of about 50 zip codes in my area and then based on that input, return one of 3 locations(address). TIA, Bill

  • Stored Proc?

    Hi All! I want to write a Stored Procedure(Oracle) I have a table 'rejrea' as follows: Name NULL? Type TCT_IK NOT NULL NUMBER(8) TRJ_TRAN_SEQ_NB NOT NULL NUMBER(8) LTRR_REJ_RSN_NB NOT NULL NUMBER(4) I have table 'REJTAB' NAME NULL? TYPE TCT_IK NOT NU