VB6 Spellcheck
| Author | Message |
|---|---|
|
Harry Pothead
Joined: Sun Jan 20, 2008 9:34 pm Posts: 2850 Location: Devon, UK |
|
|
You could make a spellchecker app with is code, or just random textbox lmfao, thanks martinliss for this..
Code: Select all Dim objWord As Object Dim objDoc As Object Dim strResult As String 'Create a new instance of word Application Set objWord = CreateObject("word.Application") Select Case objWord.Version 'Office 2000 Case "1.0" Set objDoc = objWord.Documents.Add(, , 1, True) 'Office XP Case "10.0" Set objDoc = objWord.Documents.Add(, , 1, True) 'Office 97 Case Else ' Office 97 Set objDoc = objWord.Documents.Add End Select objDoc.Content = Text1.Text objDoc.CheckSpelling strResult = Left(objDoc.Content, Len(objDoc.Content) - 1) If Text1.Text = strResult Then ' There were no spelling errors, so give the user a ' visual signal that something happened MsgBox "The spelling check is complete.", vbInformation + vbOKOnly End If 'Clean up objDoc.Close False Set objDoc = Nothing objWord.Application.Quit True Set objWord = Nothing ' Replace the selected text with the corrected text. It's important that ' this be done after the "Clean Up" because otherwise there are problems ' with the screen not repainting Text1.Text = strResult Exit Sub ___________________________________ Bollocks. |
|
| Top |
|
|
Newbie Joined: Thu May 29, 2008 6:37 am Posts: 3 |
|
|
HEY DOES ANY ONE NO WERE I CAN GET MY HANDS ON VISUAL BASIC 4 I ALLREADY NO HOW TO PROGRAM JUS NEED VISUAL BASICS
|
|
| Top |
|
|
Coding fail
Joined: Thu Nov 08, 2007 8:35 pm Posts: 3720 Location: Morecambe |
|
|
PLIES wrote: HEY DOES ANY ONE NO WERE I CAN GET MY HANDS ON VISUAL BASIC 4 I ALLREADY NO HOW TO PROGRAM JUS NEED VISUAL BASICS Its in software :p _________________ |
|
| Top |
|
•
Who is online
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
