Forms OLE: GetDocumentVar
From: Mark <markg_at_mymail.co.uk>
Date: 2 Jul 2002 06:14:54 -0700
Message-ID: <ddb31653.0207020514.743e3feb_at_posting.google.com>
Hi,
Date: 2 Jul 2002 06:14:54 -0700
Message-ID: <ddb31653.0207020514.743e3feb_at_posting.google.com>
Hi,
We have a Forms 6 application which attempts to call a macro in Word
95.
Code works fine under Word 95.
owever, after upgrading to Word 2000, the code fails. I have heard
that the object model in Word 2000 has changed, trying to find the
equivalent command from Forms to call.
A sample of the offending code is below, the line that fails is the one with the GetDocumentVar (second from bottom) on it.
- Setting Macro Error to assume failue l_arglist := OLE2.CREATE_ARGLIST; OLE2.ADD_ARG (l_arglist, 'MACRO_ERROR'); OLE2.ADD_ARG (l_arglist, 'ERROR'); OLE2.INVOKE (in_ole_obj, 'SetDocumentVar', l_arglist); OLE2.DESTROY_ARGLIST (l_arglist);
- Call the EDIT macro l_arglist := OLE2.CREATE_ARGLIST; OLE2.ADD_ARG (l_arglist, 'edit'); OLE2.ADD_ARG (l_arglist, 1); OLE2.ADD_ARG (l_arglist, 0); OLE2.ADD_ARG (l_arglist, 3); OLE2.INVOKE (in_ole_obj, 'ToolsMacro', l_arglist); OLE2.DESTROY_ARGLIST (l_arglist);
- Get the macro response l_arglist := OLE2.CREATE_ARGLIST; OLE2.ADD_ARG (l_arglist, 'MACRO_ERROR'); l_macro_error := OLE2.INVOKE_CHAR (in_ole_obj, 'GetDocumentVar$', l_arglist); OLE2.DESTROY_ARGLIST (l_arglist);
Wondered if anyone is familiar with the above. Any suggestions welcome.
Mark Received on Tue Jul 02 2002 - 15:14:54 CEST