Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Feb 2005
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    text box spelling (xp, 2003)

    Is it possible to check the spelling of text in a text box?

    If so, is there a macro that will find a text box and check the spelling?

    thanks

    Allan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: text box spelling (xp, 2003)

    If you perform the spell checking interactively, Word will include text boxes.

    In code, you can do something like this:

    Sub CheckSpellingInTextBoxes()
    Dim shp As Shape
    Dim wrd As Range
    For Each shp In ActiveDocument.Shapes
    If shp.Type = msoTextBox Then
    For Each wrd In shp.TextFrame.TextRange.Words
    If Application.CheckSpelling(wrd.Text) = False Then
    MsgBox wrd.Text ' or wrd.Select
    Exit Sub
    End If
    Next wrd
    End If
    Next shp
    End Sub

  3. #3
    Lounger
    Join Date
    Feb 2005
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: text box spelling (xp, 2003)

    Hi Hans

    Thanks for the info and macro

    Allan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •