R
Robert
Hello NG friends,
I am trying to create a students' worksheet which identifies spelling
errors by underlining them (wavy) in the text. Each error word is then
followed by a short line of calculated length depending on the
error-word length. On this second line the student will write by hand
the eventual correction.
I cannot get the code below to produce the red wavy line under the word
followed by the (black/automatic) straight line for manuscript writing.
Any change needed for the second line is carried back to the first, and
vice-versa. (There is, or should be, a space between the two forms of
underlining.)
Could anyone please suggest a modification or improvement to make this
code do what I want? Thank you in advance.
Robert.
For Each blunder In ActiveDocument.SpellingErrors
blunder.Font.UnderlineColor = wdColorRed
blunder.Font.Underline = wdUnderlineSingle
'Change above to wdUnderlineWavy ???.
blunder.Words(1).Select
Selection.MoveEndWhile Cset:=" ", Count:=wdBackward
numchars = Selection.Characters.Count
Selection.MoveRight Unit:=wdCharacter
blunder.InsertAfter Text:=String(numchars * 2.5, Chr$(32)) & " "
i = i + 1 ' counter: total no of errors.
Next blunder
I am trying to create a students' worksheet which identifies spelling
errors by underlining them (wavy) in the text. Each error word is then
followed by a short line of calculated length depending on the
error-word length. On this second line the student will write by hand
the eventual correction.
I cannot get the code below to produce the red wavy line under the word
followed by the (black/automatic) straight line for manuscript writing.
Any change needed for the second line is carried back to the first, and
vice-versa. (There is, or should be, a space between the two forms of
underlining.)
Could anyone please suggest a modification or improvement to make this
code do what I want? Thank you in advance.
Robert.
For Each blunder In ActiveDocument.SpellingErrors
blunder.Font.UnderlineColor = wdColorRed
blunder.Font.Underline = wdUnderlineSingle
'Change above to wdUnderlineWavy ???.
blunder.Words(1).Select
Selection.MoveEndWhile Cset:=" ", Count:=wdBackward
numchars = Selection.Characters.Count
Selection.MoveRight Unit:=wdCharacter
blunder.InsertAfter Text:=String(numchars * 2.5, Chr$(32)) & " "
i = i + 1 ' counter: total no of errors.
Next blunder