Is there no support to check spelling in .net???
Printable View
Is there no support to check spelling in .net???
Hi,
Yup. It might be available in the VS.Net 2004 codename "WhidBey"
Merry Chrismas..
presently not.
but it checks ur syntax .....
What about block comments? There's a macro to comment out selected blocks, but not one to uncomment them (at least in VB7). In either VB6 or eVB there was a utility available to do this, same for Delphi. What about .Net? And can a macro be added to the toolbar?
You can comment and uncomment selected lines from the toolbar. I'll attach a picture. The one on the left comments and the one on the right uncomments there isn't even a need for a macro. If you don't see this toolbar then right click on the toolbars you do have and check 'Text Editor' to get it.
http://www.vbforums.com/attachment.p...postid=1588499
Thanks Edneiss.
Why would Microsoft do this?
They have a toolkit that will add support for office 2003, but 2003 only. Are they hurting for money that bad? I don't understand that type of logic, on one hand they add all kinds of new toys but on the other hand they are taking away some of the necessary stuff.
Beats me!
Do you mean Visual Studio 2003?
Either way you can build your own addin to check spelling or even just a macro. Especially if you have one of Word because you can use its spellchecker via code. Of course if you don't have Word or want to build your own then there are 3rd party ones out there. I know there are 3rd part spell checking components and I'd imagine that if you google you might find an addin that someone has already made for your version of Visual Studio.
I have found an article that describes how to code this option but it did not work for me.It keeps on showing me that same old error. here is the Code.
PS: I have run some 3rd party spell engines and have to say that the ones I tried aren’t worth having. Don’t get this the wrong way, I’m not trying to knock someone else’s software, it is just that they where missing some of the simplest words to correct.Code:Private Sub SpellOrGrammarCheck(ByVal blnSpellOnly As Boolean)
Try
Dim objWord As Object
Dim objTempDoc As Object
Dim iData As IDataObject
If TextBox1.Text = "" Then
Exit Sub
End If
objWord = New WordApplication '<------Error is here Why?
objTempDoc = objWord.Documents.Add
objWord.Visible = False
objWord.WindowState = 0
objWord.Top = -3000
Clipboard.SetDataObject(TextBox1.Text)
With objTempDoc
.Content.Paste()
.Activate()
If blnSpellOnly Then
.CheckSpelling()
Else
.CheckGrammar()
End If
.Content.Copy()
iData = Clipboard.GetDataObject
If iData.GetDataPresent(DataFormats.Text) Then
TextBox1.Text = CType(iData.GetData(DataFormats.Text), _
String)
End If
.Saved = True
.Close()
End With
objWord.Quit()
MessageBox.Show("The spelling check is complete.", _
"Spell Checker", MessageBoxButtons.OK, _
MessageBoxIcon.Information)
Catch COMExcep As COMException
MessageBox.Show( _
"Microsoft Word must be installed for Spell/Grammar Check " _
& "to run.", "Spell Checker")
Catch Excep As Exception
MessageBox.Show("An error has occured.", "Spell Checker")
End Try
End Sub
Bottom line: What I wanted to do, was to build a notepad with the spell and grammar option in it, but I did not realize that it was such a dig deal in .Net
:wave:
You didn't mention what error it was that you are getting but you need to make a reference to the Word object Library in order to run that code, since you use early binding.
I did make a reference to it using: Microsoft NetShow Real-Time Encoder Callback Proxy Type Library. LOL
Sorry about that, I did not even notice it till I was ready to delete the all references and start over, I should have checked it in the first place.
Anyway! That code works just fine.
Also if someone happens to do a search for the same thing, here is something else that can be used.
Also works well.Code:‘Put this into the click event
If TextBox1.Text.Length > 0 Then
Dim Word As New Word.ApplicationClass
Dim doc As Word.DocumentClass = Word.Documents.Add()
Word.Visible = False
Clipboard.SetDataObject(TextBox1.Text)
doc.Content.Paste()
doc.Activate()
doc.CheckSpelling()
doc.Content.Copy()
If Clipboard.GetDataObject.GetDataPresent(DataFormats.Text) Then
TextBox1.Text = CType(Clipboard.GetDataObject.GetData(DataFormats.Text), String)
End If
doc.Saved = True
doc.Close()
Word.Quit()
End If
Thanks Edneeis for the heads up !
Happy Holidays