Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Spell Checking


Message #1 by "Wally" <Wally@P...> on Wed, 20 Dec 2000 16:45:51 -0000
I am trying to use the word spell checker on a text area.

I have set up a button that calls the function to do the spell checking.

This works if the HTML is on my machine. But if it is on the web or on the

local host it gives an error.

So I figure I have to set up an <object> refering to MS Word. So How do I go about

doing that?



Thanks in advance for your help



The code that I am currently using is:



	str = MLTA.text1.value 'Form name MLTA

	if isempty(str) or isnull(str) or str="" then

		msgbox "Nothing to check!"

	else

		on error resume next

		Set wordobject = CreateObject("word.Application")

		if err.number <> 0 then

		        msgbox "Spell Checking not available"

		else

			wordobject.WindowState = 2

			wordobject.Visible = True

			Set docobject= wordobject.Documents.Add( , , 1, True)

			docobject.Content=str

			docobject.CheckSpelling

			MLTA.text1.value = docobject.Content

			docobject.Close False

			Set docobject = Nothing

			wordobject.Application.Quit True

			Set wordobject = Nothing

			MsgBox "Spell Check Complete"

		end if

	end if





Wally Burfine



---

MaximumASP offers enhanced hosting solutions on the Windows 2000 platform. Dedicated processor, RAM, and server resources provide
dedicated server performance at virtual server prices. Commercial components provided; custom components allowed.

---

You are currently subscribed to asp_web_howto as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_web_howto-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index