Hello:

I have a vbscript in order to do a checkspelling with Word of a textarea
name="comentario" in a form id="frmDiarioNoticias", but it does not work
after the line "else".

I've installed Office 2000. The form is in a XHTML page.

What's the problem?, I've tried many changes but it doesn't work anyway.
Best regards to the group.
________________________________

Sub ComprobarTextoRevistaPrensa()
Dim strTextoComentario
Dim ObjetoWord
Dim TextoTemporal
'---- This part works properly: ----
strTextoComentario =
Trim(window.document.getElementById("frmDiarioNoticias").comentario.Value)
If strTextoComentario = "" Then
MsgBox "El texto está en blanco", vbExclamation, "Comprobar texto"
Exit Sub
Else
'----- The failure begins here -----
Set ObjetoWord = CreateObject("Word.Application")
Set TextoTemporal = ObjetoWord.Documents.Add
ObjetoWord.Visible = False
With TextoTemporal
.Activate
.Content.Text = strTextoComentario
.CheckSpelling
window.document.getElementById("frmDiarioNoticias").comentario.Value
= .Content.Text
.Saved = False
.Close (0)
End With
Set TextoTemporal = Nothing
ObjetoWord.Quit
Set ObjetoWord = Nothing
End If
End Sub

Re: vbscript word checkspelling... SOLVED. by J

J
Mon Jul 30 10:22:48 CDT 2007

Hello:

The problem is already solved.
It was the IE7 security, there was many changes because a new installation
and I didn't remember it.
I've added my site to the secure sites list.

Best regards to the vbscript group.
____________________________________


"J. Enrique Alcaraz" <alcarazQUITARarrobaESTOranpuntoes> escribió en el
mensaje news:uKb0JIi0HHA.4928@TK2MSFTNGP05.phx.gbl...
> Hello:
>
> I have a vbscript in order to do a checkspelling with Word of a textarea
> name="comentario" in a form id="frmDiarioNoticias", but it does not work
> after the line "else".
>
> I've installed Office 2000. The form is in a XHTML page.
>
> What's the problem?, I've tried many changes but it doesn't work anyway.
> Best regards to the group.
> ________________________________
>
> Sub ComprobarTextoRevistaPrensa()
> Dim strTextoComentario
> Dim ObjetoWord
> Dim TextoTemporal
> '---- This part works properly: ----
> strTextoComentario =
> Trim(window.document.getElementById("frmDiarioNoticias").comentario.Value)
> If strTextoComentario = "" Then
> MsgBox "El texto está en blanco", vbExclamation, "Comprobar texto"
> Exit Sub
> Else
> '----- The failure begins here -----
> Set ObjetoWord = CreateObject("Word.Application")
...