Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using MS-Word Spell check API's in VB

Posted on 2004-03-25
2
Medium Priority
?
487 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

604 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