Private Sub SpellCheck_Click() Dim objWord As Object Dim objDoc As Object Dim strResult As String Const QUOTE = """" On Error GoTo ErrorRoutine App.OleRequestPendingTimeout = 999999 Set objWord = GetObject("Word.Application") If TypeName(objWord) <> "Nothing" Then ' Word is already open Set objWord = GetObject(, "Word.Application") Else ' Create an instance of Word Set objWord = CreateObject("Word.Application") End If Me.Show Select Case objWord.version 'Office 2000 and later Case "9.0", "10.0", "11.0", "14.0", "15.0" Set objDoc = objWord.Documents.Add(, , 1, True) 'Office 97 Case "8.0" Set objDoc = objWord.Documents.Add Case Else MsgBox "Sorry but your version of Word seems to be " & QUOTE & objWord.version _ & QUOTE & " and that version is not currently supported.", vbOKOnly + vbExclamation, "Spelling Checker" Exit Sub End Select
Gain unlimited access to on-demand training courses with an Experts Exchange subscription.Get Access
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE
Connect with Certified Experts to gain insight and support on specific technology challenges including: