WordBasic

J

Jeff Gambino

This may not be the proper discussion group for this posting but here goes.

My shop is in the process of converting from Oracle Client server Forms6i to
Oracle Web Forms10g2.

Having said that....

I have a bunch of "OLE2" commands now "Client_OLE2" commands, that I use to
Create/Open?Save etc... word documents(Word 2000 9.0.6926 SP3). To accomplish
these tasks I've been referencing the 'WordBasic' object property of Word and
issuing WordBasic commands such as 'AppShow', 'AppMaximize' and the like. A
sample of the code is below:

PROCEDURE open_word IS
APPLICATION CLIENT_OLE2.OBJ_TYPE;
TEMP_APPLICATION CLIENT_OLE2.OBJ_TYPE;
errnum number := error_code;
errtext varchar2(100) :=error_text;
errtype varchar2(100) := error_type;
alert_button number;
BEGIN

/*
** Call word and pass the application id back to the calling module
*/
-- Create Word App
TEMP_APPLICATION := CLIENT_OLE2.CREATE_OBJ('Word.Application');
-- Create Word Basic object
APPLICATION := CLIENT_OLE2.GET_OBJ_PROPERTY(TEMP_APPLICATION,
'WordBasic');

--Make Word visible and Full Screen
CLIENT_OLE2.INVOKE(APPLICATION,'WordBasic.AppShow');
CLIENT_OLE2.INVOKE(APPLICATION,'WordBasic.AppMaximize'); MESSAGE

:GLOBAL.TEMP_APPLICATION := APPLICATION;
:GLOBAL.APPLICATION := APPLICATION;

EXCEPTION
WHEN OTHERS THEN
BELL;
MESSAGE ('Open Word - '||ERRTYPE||' - '||TO_CHAR(errnum)||'; '||errtext
||
' sqlcode = '||to_char(sqlcode));
END;

At this point Word should be opened and Maximized on the client's desktop.

This code no longer works and all the errors I receive indicate that the
WordBasic commands are not recognized. For that matter 'WordBasic' is not
recognized as a valid object property at all.

Is this indeed the case? Is 'WordBasic' no longer an object property of
Word?

If so how do I access it via OLE2 commands.

Any help with this would be greatly appreciated.

Thanks
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?SmVmZiBHYW1iaW5v?=,
This may not be the proper discussion group for this posting but here goes.
No, it's really not. One of the Office.developer groups might be better;
possibly a Word.vba group, on the off-chance someone their has worked with a
similar interface.

FWIW, WordBasic hasn't been the automation interface since Word 97 came out.
It's still been supported, through the VBA object model, but only as
late-binding. It's also the language DDE works through. I've no idea what
"Forms6i" used, compared to the interface you're working with, now. But I'm
guessing this newer version would require you to use the OLE-interface Word has
provided for the past eight years, rather than the older one...

You might check whether Oracle doesn't provide some sample code or some
documentation on automating Office applications, especially Word.
My shop is in the process of converting from Oracle Client server Forms6i to
Oracle Web Forms10g2.

Having said that....

I have a bunch of "OLE2" commands now "Client_OLE2" commands, that I use to
Create/Open?Save etc... word documents(Word 2000 9.0.6926 SP3). To accomplish
these tasks I've been referencing the 'WordBasic' object property of Word and
issuing WordBasic commands such as 'AppShow', 'AppMaximize' and the like. A
sample of the code is below:

PROCEDURE open_word IS
APPLICATION CLIENT_OLE2.OBJ_TYPE;
TEMP_APPLICATION CLIENT_OLE2.OBJ_TYPE;
errnum number := error_code;
errtext varchar2(100) :=error_text;
errtype varchar2(100) := error_type;
alert_button number;
BEGIN

/*
** Call word and pass the application id back to the calling module
*/
-- Create Word App
TEMP_APPLICATION := CLIENT_OLE2.CREATE_OBJ('Word.Application');
-- Create Word Basic object
APPLICATION := CLIENT_OLE2.GET_OBJ_PROPERTY(TEMP_APPLICATION,
'WordBasic');

--Make Word visible and Full Screen
CLIENT_OLE2.INVOKE(APPLICATION,'WordBasic.AppShow');
CLIENT_OLE2.INVOKE(APPLICATION,'WordBasic.AppMaximize'); MESSAGE

:GLOBAL.TEMP_APPLICATION := APPLICATION;
:GLOBAL.APPLICATION := APPLICATION;

EXCEPTION
WHEN OTHERS THEN
BELL;
MESSAGE ('Open Word - '||ERRTYPE||' - '||TO_CHAR(errnum)||'; '||errtext
||
' sqlcode = '||to_char(sqlcode));
END;

At this point Word should be opened and Maximized on the client's desktop.

This code no longer works and all the errors I receive indicate that the
WordBasic commands are not recognized. For that matter 'WordBasic' is not
recognized as a valid object property at all.

Is this indeed the case? Is 'WordBasic' no longer an object property of
Word?

If so how do I access it via OLE2 commands.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top