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