Ja, es gibt keine Autokorretur in Formular-Kontrollelementen, kann man sich nur per Makro basteln.Airlinepapst2 hat geschrieben:Hat jemand eine Idee woran es liegen kann??
Siehe z.B. hier.
HTH R
Moderator: Moderatoren
Ja, es gibt keine Autokorretur in Formular-Kontrollelementen, kann man sich nur per Makro basteln.Airlinepapst2 hat geschrieben:Hat jemand eine Idee woran es liegen kann??
Code: Alles auswählen
aLocale.Language = "de"
aLocale.Country = "DE"
s = Array("ni", "Airline","Papst", "dre")
Code: Alles auswählen
SUB Spellcheck
Dim s() As Variant
Dim vReturn As Variant, i As Integer
Dim emptyArgs(0) as new com.sun.star.beans.PropertyValue
Dim aLocale As New com.sun.star.lang.Locale
aLocale.Language = "de"
aLocale.Country = "DE"
s = Array("di", "Herr","Frau", "die")
'http://api.openoffice.org/common/ref/com/sun/star/linguistic2/XSpellChecker.html
DIM vSpeller AS VARIANT
vSpeller = createUnoService("com.sun.star.linguistic2.SpellChecker")
FOR i = LBound(s()) TO UBound(s())
vReturn = vSpeller.isValid(s(i), aLocale, emptyArgs())
IF vReturn = False THEN
vReturnS = vSpeller.spell(s(i), aLocale, emptyArgs())
sAlternativen = vReturnS.Alternatives
FOR a = 0 TO UBound(sAlternativen)
sAlternative=sAlternative+vReturnS.Alternatives(a)+chr(13)
NEXT
MsgBox "Rechtschreibprüfung: Das Wort '" & s(i) & "' ist vermutlich falsch. " &chr(13)& "Alternativvorschläge: " &chr(13)& sAlternative
END IF
sAlternative=""
Next
END SUB