Help!

Using office spell check from VB

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Spelling / Grammar RSS
Next:  Bookshelf  
Author Message
David De Bono
External


Since: Nov 29, 2005
Posts: 1



PostPosted: Tue Nov 29, 2005 11:49 pm    Post subject: Using office spell check from VB
Archived from groups: microsoft>public>office>developer>automation, others (more info?)

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
Back to top
Cindy M -WordMVP-
External


Since: Jun 21, 2004
Posts: 1830



PostPosted: Wed Nov 30, 2005 10:57 am    Post subject: Re: Using office spell check from VB [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.DeleteThis@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 Smile
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Spelling / Grammar All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum