Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Forms, Word and Document Variables

Forms, Word and Document Variables

From: Mark <markg_at_mymail.co.uk>
Date: 16 Jul 2002 02:35:09 -0700
Message-ID: <ddb31653.0207160135.684474f3@posting.google.com>


Hi,

I have an application which is trying to read a document variable from Word.
Below is an example of a procedure which opens Word, creates a document variable then tries to read the contents of it. It always fails on retrieving the document variable and i get an ORA-305500.

Using Forms6i on Windows 2000 using Word 2000 (although Word 98 should work i think).

The VBA equivalent for writing and reading the document variables are as follows:

ActiveDocument.Variables.Add Name:="MyVar", Value:="12"

ActiveDocument.Variables("MyVar").Value

Any thoughts welcome.


DECLARE

 BEGIN            

  OLE2.SET_PROPERTY(MyApplication, 'Visible', 'True'); -- Comment this line to hide the application.

message('Adding Document Variable');

message('Reading Document Variable');

exception

         when others then          

     message(sqlerrm||sqlcode);
     OLE2.DESTROY_ARGLIST(args);
     OLE2.INVOKE(MyDocument,'Close'); 
    -- Release the OLE objects
     OLE2.RELEASE_OBJ(MyDocument);
     OLE2.RELEASE_OBJ(MyDocuments);
     OLE2.RELEASE_OBJ(MyApplication);

END;


M Received on Tue Jul 16 2002 - 04:35:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US