You are here:About>Computing & Technology>Delphi Programming> Advanced Delphi Techniques> OLE / COM / Automation> Automation> Spell Checking from Delphi code using MS Word - Word Automation in Delphi
About.comDelphi Programming
Newsletters & RSSEmail to a friendSubmit to Digg

Spell Checking from Delphi code using MS Word - Office Automation in Delphi

From Zarko Gajic,
Your Guide to Delphi Programming.
FREE Newsletter. Sign Up Now!

What is (OLE) Automation? What is Automation Server? What is Automation Client?

Suppose you are developing an HTML editor like HTML Kit. As like any other textual editor your application should contain some kind of spell checking system. Why buy spell checking components or write them from scratch when you can easily use MS Word?

OLE Automation

Automation is a convention by which one application can control another. The controlling application is referred to as the automation client, and the one being controlled is referred to as the automation server. The client manipulates the server application’s components by accessing those components properties and methods.

Automation (also known as OLE Automation) is a feature that programs use to expose their objects to development tools, macro languages, and other programs that support Automation. For example, Microsoft Outlook may expose objects for sending and receiving e-mail, for scheduling, and for contact and task management.

By using Word Automation (server), we can use Delphi (client) to dynamically create a new document, add some text we want to spell check, and then have Word check the spelling. If we keep Microsoft Word minimized, our users might never know! Thanks to Microsoft Word's OLE interface, we can take a side trip from Delphi and look at ways to cheat when developing our version of Notepad editor :)

There's only one glitch ;) Users of the application need to have Word installed. But don't let this stop you.

Of course, to fully master the use of Automation in your applications, you must have detailed working knowledge of the applications you are integrating - in this case the MS Word.

In order for your "Office" programs to work, the user must own the application that acts like Automation server. In our case MS Word must be installed on the user's machine.

  1. What is (OLE) Automation? What is Automation Server? What is Automation Client?
  2. Connecting to Word: "Hello Word" Early Binding vs. Late Binding
  3. Launching (Automating) Word Silently
  4. The Spell Check Project - TWordApplication, TWordDocument
  5. The Spell Check Project - Spell Check / Replace
  6. Finally: Delphi Source Code
  7. Thesaurus? Thesaurus!

Previous | Next >>

 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.