Affectation de valeur à un textarea

vince1303 Messages postés 30 Date d'inscription vendredi 18 mars 2005 Statut Membre Dernière intervention 18 septembre 2008 - 7 mars 2008 à 11:18
vince1303 Messages postés 30 Date d'inscription vendredi 18 mars 2005 Statut Membre Dernière intervention 18 septembre 2008 - 7 mars 2008 à 11:27
Vince

3 réponses

vince1303 Messages postés 30 Date d'inscription vendredi 18 mars 2005 Statut Membre Dernière intervention 18 septembre 2008
7 mars 2008 à 11:25
Vince
0
vince1303 Messages postés 30 Date d'inscription vendredi 18 mars 2005 Statut Membre Dernière intervention 18 septembre 2008
7 mars 2008 à 11:26
Vince
0
vince1303 Messages postés 30 Date d'inscription vendredi 18 mars 2005 Statut Membre Dernière intervention 18 septembre 2008
7 mars 2008 à 11:27
Bonjour,

J'essaye de faire un correcteur d'orthographe s'appuyant sur word pour un editeur de texte "web" reposant sur un textarea.
J'ai 2 problèmes :

1 - Le correcteur corrige bien les fautes (1), mais le texte n'est jamais renvoyé au textarea (2)
2 - Comment dire à word de ne pas essayer de corriger les balises HTML de mise en forme du texte.

La fonction appelée

function checkspell()
Dim oShell
Set oShell = CreateObject("Wscript.Shell")

Dim myText, oWindow, oDocument, oSelect, oSelectRange
const wdDoNotSaveChanges = 0
myText=document.formname.Editeur_Texte.Value

Dim oWD, oDoc, RangeOriginal, RangeCorrected, Cnt, Status
Set oWD = CreateObject("Word.Application")
oWD.Visible =false
Set oDoc = oWD.Documents.Add
On Error Resume Next
oWD.Selection.TypeText myText

Set RangeOriginal=oWD.ActiveDocument.Range(0,oWD.Selection.End)
If oWD.CheckSpelling(RangeOriginal)=False Then
oWD.ActiveDocument.CheckSpelling
Set RangeCorrected = oWD.ActiveDocument.Range(0,oWD.Selection.End)
RangeCorrected.copy
MsgBox(RangeCorrected)
document.formname.Editeur_Texte.Value = RangeCorrected
End If

oWD.Quit wdDoNotSaveChanges
Set oDoc = Nothing
Set oWD = Nothing

End Function


merci de votre aide

Vince
0
Rejoignez-nous