Home » Developer & Programmer » Forms » Microsoft Spell Checker from Forms10g (Forms10g)
Microsoft Spell Checker from Forms10g [message #380947] Wed, 14 January 2009 05:21 Go to next message
jayete2000
Messages: 3
Registered: March 2005
Location: Spain
Junior Member
กกก Hi !!!

I'm using Forms10g and I have to run the Microsoft's Spell-Checker using Webutil's Client_OLE2. I've found the solution on Metalink. There are a sample and it runs fine. Now I have a new problem.

By default, the Spell-Checker starts using the Spanish dictionary (I'm from Spain and it is correct, by default we speak and write in Spanish), but I have to say the the spell-checker that it must use another dictionary (the UK/USA dictionary, or the French dictionary, for example). I'm trying to do this, but every time that the spell checker appears on screen it is using the Spanish dictionary.

Does anybody know how I have to say to the spell-checker that it must use another language instead of Spanish?

A lot of thanks.

P.S: Sorry for my horrible English. This is the code I found on Metalink:

PROCEDURE SPELL_CHECK (ITEM_NAME IN VARCHAR2) IS
MY_APPLICATION CLIENT_OLE2.OBJ_TYPE;
MY_DOCUMENTS CLIENT_OLE2.OBJ_TYPE;
MY_DOCUMENT CLIENT_OLE2.OBJ_TYPE;
MY_SELECTION CLIENT_OLE2.OBJ_TYPE;
GET_SPELL CLIENT_OLE2.OBJ_TYPE;
MY_SPELL CLIENT_OLE2.OBJ_TYPE;
ARGS CLIENT_OLE2.LIST_TYPE;
SPELL_CHECKED VARCHAR2(4000);
ORIG_TEXT VARCHAR2(4000);

BEGIN
ORIG_TEXT := NAME_IN(ITEM_NAME);

-- CREATE WORD.APPLICATION OBJECT
MY_APPLICATION := CLIENT_OLE2.CREATE_OBJ('WORD.APPLICATION');
CLIENT_OLE2.SET_PROPERTY(MY_APPLICATION, 'VISIBLE', FALSE);

-- GET HANDLE FOR DOCUMENTS COLLECTION
MY_DOCUMENTS := CLIENT_OLE2.GET_OBJ_PROPERTY(MY_APPLICATION, 'DOCUMENTS');

-- ADD A NEW DOCUMENT TO THE DOCUMENTS COLLECTION
MY_DOCUMENT := CLIENT_OLE2.INVOKE_OBJ(MY_DOCUMENTS, 'ADD');

-- GET HANDLE FOR SELECTION OBJECT
MY_SELECTION := CLIENT_OLE2.GET_OBJ_PROPERTY(MY_APPLICATION, 'SELECTION');

-- INSERT THE TEXT FIELD INTO DOCUMENT
CLIENT_OLE2.SET_PROPERTY(MY_SELECTION, 'TEXT', ORIG_TEXT);

-- GET HANDLE FOR ACTIVE DOCUMENT
GET_SPELL := CLIENT_OLE2.GET_OBJ_PROPERTY(MY_APPLICATION, 'ACTIVEDOCUMENT');

-- INVOKE SPELL CHECKER
CLIENT_OLE2.INVOKE(GET_SPELL, 'CHECKSPELLING');

-- Added to handle a cancel request.
CLIENT_OLE2.INVOKE(MY_SELECTION,'WholeStory');
CLIENT_OLE2.INVOKE(MY_SELECTION,'Copy');

-- GET CHECKED TEXT FROM DOCUMENT
SPELL_CHECKED := CLIENT_OLE2.GET_CHAR_PROPERTY(MY_SELECTION, 'TEXT');

-- REFORMAT RETURN TEXT TO DISPLAY CORRECTLY IN FORMS
SPELL_CHECKED := substr(replace(SPELL_CHECKED,chr(13),chr(10)), 1, length(SPELL_CHECKED));

-- COPY NEW TEXT IN THE FORM
COPY(SPELL_CHECKED,ITEM_NAME);

-- CLOSE THE DOCUMENT WITHOUT SAVING
ARGS := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(ARGS, 0);
CLIENT_OLE2.INVOKE(MY_DOCUMENT, 'CLOSE',ARGS);
CLIENT_OLE2.DESTROY_ARGLIST(ARGS);

-- RELEASE THE OLE OBJECTS
CLIENT_OLE2.RELEASE_OBJ(MY_SELECTION);
CLIENT_OLE2.RELEASE_OBJ(GET_SPELL);
CLIENT_OLE2.RELEASE_OBJ(MY_DOCUMENT);
CLIENT_OLE2.RELEASE_OBJ(MY_DOCUMENTS);
CLIENT_OLE2.INVOKE(MY_APPLICATION, 'QUIT');
CLIENT_OLE2.RELEASE_OBJ(MY_APPLICATION);
END;
Re: Microsoft Spell Checker from Forms10g [message #381026 is a reply to message #380947] Wed, 14 January 2009 22:37 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
As you have got the Spell Checker running successfully from Forms, I think this is really a Microsoft question. I suggest that you try googling your question and look in Microsoft Forums.

David
Re: Microsoft Spell Checker from Forms10g [message #381116 is a reply to message #381026] Thu, 15 January 2009 05:48 Go to previous message
jayete2000
Messages: 3
Registered: March 2005
Location: Spain
Junior Member
Thanks. I will try it.
Previous Topic: How to select multiple items in list in forms10g & using ctrl+select multi list values (merged)
Next Topic: Export Forms data to XML and Import XML data into Forms
Goto Forum:
  


Current Time: Wed Dec 07 14:33:05 CST 2016

Total time taken to generate the page: 0.11593 seconds