calling word spell checker from access

J

JK

Hi,

I have the following function, which works fine for spell checking text
boxes. the only problem I seem to be having is telling it to be on the TOP
window, so that the user knows it has popped up in its own window. How do I
tell it to stay on top, so that the user knows it's there?

Thanks!


Function SpellCheck(CheckWhat) As String
On Error GoTo Err_rtn

SpellCheck = CheckWhat

Dim X As Object
'make a reference to Word Library
Set X = CreateObject("Word.Application")
X.Visible = False
X.Documents.Add
X.Selection.Text = CheckWhat
X.ActiveDocument.CheckSpelling
SpellCheck = X.Selection.Text
X.ActiveDocument.Close savechanges:=wdDoNotSaveChanges
X.Quit

Exit_rtn:
Exit Function

Err_rtn:
MsgBox Err.Description
Resume Exit_rtn
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top