vbscript and TextPad as a Spellchecker
Posted: Sun May 04, 2014 7:33 am
Hi,
I currently have some vbscript that is using MS Word as a spellchecker. However, whenever the text is pasted back to my calling application, the apostrophe's are slanted. I've tried fixed fonts and a variety of other's with no success. So I thought I'd try to use TextPad. Anyone ever tried?
Another option would be to call an External Spell Checker. Know of any?
The following is my code for MS Word:
I currently have some vbscript that is using MS Word as a spellchecker. However, whenever the text is pasted back to my calling application, the apostrophe's are slanted. I've tried fixed fonts and a variety of other's with no success. So I thought I'd try to use TextPad. Anyone ever tried?
Another option would be to call an External Spell Checker. Know of any?
The following is my code for MS Word:
Code: Select all
' A simple script that checks the spelling of a Song Title
Sub SpellCheck
' Define variables
Dim list, lstItm
Dim objWord, objDoc, objSel
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
' Get list of selected tracks from MediaMonkey
Set list = SDB.CurrentSongList
' Process all selected tracks
For i=0 To list.count-1
Set lstItem = list.Item(i)
Set objDoc = objWord.Documents.Add
objDoc.Activate
objDoc.Content.Text = lstItem.Title
objDoc.CheckSpelling
Set objSel = objWord.Selection
objSel.Font.Name = "Courier New"
lstItem.Title = Left(objdoc.Content.Text, Len(objDoc.Content.Text) - 1)
Set objSel = Nothing
objDoc.Saved = False
objDoc.Close (0)
Set objDoc = Nothing
Next
' Write all back to DB and update tags
list.UpdateAll
objWord.Quit
Set objWord = Nothing
MsgBox "Spell Check is complete."
End Sub