Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE spell check

Status
Not open for further replies.

DeannaLee

Programmer
Jul 3, 2002
4
US
I need to toggle the ignore Upper case option on the tools options menu of Word when doing a spell check from Oracle forms. What is the OLE code to do this? I already have the code to do the spell check working.

Any help would be great!

Thanks,

Deanna
 
To set the ignore upper case to true, you could use the following:
hApplication := OLE2.CREATE_OBJ('Word.Application');
hOptions := OLE2.GET_OBJ_PROPERTY(hApplication, 'Options');
OLE2.SET_PROPERTY(hOptions, 'IgnoreUppercase', TRUE);

To actually toggle the setting, try this:
OLE2.SET_PROPERTY(hOptions, 'IgnoreUppercase', NOT OLE2.GET_BOOL_PROPERTY(hOptions, 'IgnoreUppercase'));
 
Thanks sfvb. This code really helped. I did find that IgnoreUppercase works as a number though. So revised:

hApplication := OLE2.CREATE_OBJ('Word.Application');
hOptions := OLE2.GET_OBJ_PROPERTY(hApplication, 'Options');
OLE2.SET_PROPERTY(hOptions, 'IgnoreUppercase', 0);

I ended up getting the current property:
PNUM := OLE2.GET_NUM_PROPERTY(hOptions, 'IgnoreUppercase');

and setting back the IgnoreUppercase after I was finished in case my users liked it that way.
OLE2.SET_PROPERTY(hOptions, 'IgnoreUppercase', PNUM);

Works Great! Thanks so much for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top