Home > Archive > Visual Basic > November 2005 > Using office spell check from VB
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using office spell check from VB
|
|
| David De Bono 2005-11-29, 6:55 pm |
| Hi,
I'm using VB 6 with the Word object:
Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim oDic As Word.Dictionary
Dim oSuggestions As SpellingSuggestions
Set oWord = CreateObject("Word.Application")
Set oDoc = oWord.Documents.Add
Set oDic = oWord.Languages(wdEnglishUS).ActiveSpellingDictionary
Set oSuggestions = oWord.GetSpellingSuggestions(Trim$(sWord), , ,
oDic)
oDic contains the dictionary object. And it contains the correct dictionary
(MSSP3EN.LEX)
The line works fine when using the Norwegian spell checker.
When trying to use another spell language it does not fail, but returns
nothing.
If I change the default office language (Microsoft Office 2003 Laguage
settings -> Default office behaviour language) to English it works with
English spell check.
So when using the spell checker in the same laguage as office behaviour it
works.
Any ideas ?
David
| |
| Cindy M -WordMVP- 2005-11-30, 7:55 am |
| Hi David,
> The line works fine when using the Norwegian spell checker.
>
> When trying to use another spell language it does not fail, but returns
> nothing.
>
> If I change the default office language (Microsoft Office 2003 Laguage
> settings -> Default office behaviour language) to English it works with
> English spell check.
>
> So when using the spell checker in the same laguage as office behaviour it
> works.
>
> Any ideas ?
>
Look up this article in Google Newsgroup search. I think Richard describes
what you're looking for
Automating spell check from outside Word
From: Richard.Pearce@broadcastingdata.com (Richard Pearce)
Newsgroups: microsoft.public.word.international.features
Subject: MainDictionary parameter of CheckSpelling method does not work:
Workaround
Date: 1 Mar 2002 04:39:33 -0800
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
|
|
|
|
|