?
Solved

Using MS-Word Spell check API's in VB

Posted on 2004-03-25
2
Medium Priority
?
480 Views
Last Modified: 2013-12-26
I have an array of 6 English words. Out of these words some are not spelt properly. While going through this array in a "for loop", I need to write each correctly spelt word into a file (.txt or .doc). If a word is incorrectly spelt then I should not write it in the file.
Should I be using some Word-API to achieve the task? If yes, can you please let me know how to do this? (I have MS Word-2002 installed in my system.)

E.g.
Dollar
Doller
Dallor
Paund
Pound

Now while reading this array only Dollar and Pound should be written out in the file (.txt or .doc).
0
Comment
Question by:subo75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Expert Comment

by:pg_india
ID: 10685672
try this tool which i am using:
http://www.tachyon-labs.com/tspell/
0
 
LVL 2

Accepted Solution

by:
dmenard earned 1000 total points
ID: 10686152
Some pseudo code (from my memory) which can help :

' Launch word
Set WordApplication = CreateObject("Word.Application")

' for debugging : let the word window be visible
WordApplication.Visible=true

' Create a new blank document
Set WordDocument = WordApplication.Documents.Add()

' check a word (repeat for each word)
for ...
   WordDocument.Content.Text = h
   if    WordDocument.SpellingErrors.count=0 then
      ' the word is OK
   else
      ' the word is misspelled
   end if
   WordDocument.Content.Delete
next

' when all the word are checked, close word
   WordDocument.Close false
   Set WordDocument=nothing
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question