Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Forms, Word and Document Variables
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
![]() |
![]() |