for spell check need to switch window [message #582970] |
Wed, 24 April 2013 01:50 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/3a151f0b4a97be670765e97e66320d2b?s=64&d=mm&r=g) |
adeel_ans786
Messages: 22 Registered: September 2012 Location: United Arab Emirates
|
Junior Member |
|
|
Hi,
Using the below code my spell check is working fine, but the only problem i have is to spell check i have to switch window (Alt+Tab) from forms to spell check.
Is there any way to automatically activate the spell check window.
following is the code:
PROCEDURE spell_check (item_name IN VARCHAR2)
IS
my_application ole2.obj_type;
my_documents ole2.obj_type;
my_document ole2.obj_type;
my_selection ole2.obj_type;
get_spell ole2.obj_type;
my_spell ole2.obj_type;
args ole2.list_type;
spell_checked VARCHAR2 (4000);
orig_text VARCHAR2 (4000);
BEGIN
orig_text := NAME_IN (item_name);
my_application := ole2.create_obj('WORD.APPLICATION');
ole2.set_property (my_application, 'VISIBLE', FALSE);
my_documents := ole2.get_obj_property (my_application, 'DOCUMENTS');
my_document := ole2.invoke_obj (my_documents, 'ADD');
my_selection := ole2.get_obj_property (my_application, 'SELECTION');
ole2.set_property (my_selection, 'TEXT', orig_text);
get_spell :=ole2.get_obj_property (my_application, 'ACTIVEDOCUMENT');
ole2.invoke (get_spell, 'CHECKSPELLING');
ole2.invoke (my_selection, 'WholeStory');
ole2.invoke (my_selection, 'Copy');
spell_checked := ole2.get_char_property (my_selection, 'TEXT');
spell_checked :=SUBSTR (REPLACE (spell_checked, CHR (13), CHR (10)),1,LENGTH (spell_checked));
COPY (spell_checked, item_name);
args := ole2.create_arglist;
ole2.add_arg (args, 0);
ole2.invoke (my_document, 'CLOSE', args);
ole2.destroy_arglist (args);
ole2.RELEASE_OBJ (my_selection);
ole2.RELEASE_OBJ (get_spell);
ole2.RELEASE_OBJ (my_document);
ole2.RELEASE_OBJ (my_documents);
ole2.invoke (my_application, 'QUIT');
ole2.RELEASE_OBJ (my_application);
END;
Thanks in advance.
|
|
|
|
|
|