VB and VBA Users Source Code: Spell check RTF documents in VB
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Spell check RTF documents in VB
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Friday, October 06, 2000
Hits:
939
Category:
Visual Basic General
Article:
To spell check RTF documents, you could resort to embedding Word into your application. However, if you plan to use the WebBrowser control, there's no need to program Word for spell checking. That's because the WebBrowser control provides this functionality for you. To access it, you use the WebBrowser control's ExecWB() method with the OLECMDID_SPELL flag. To illustrate, add the WebBrowser control to a form, then add the following code to the form's Load() event WebBrowser1.Navigate "D:\Internet\spell.rtf" Replace the path with any string that points to an RTF file. Next, add a command button, and enter this code in its Click() event: WebBrowser1.ExecWB OLECMDID_SPELL, OLECMDEXECOPT_DODEFAULT Run the project. The WebBrowser displays the RTF file, and when you click the command button, VB runs through the normal spell check operation.
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder