Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Apr 2003
    Location
    Salt Lake City, Utah, USA
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    macro to highlight parts of speech? (2003)

    Is there a way to utilize Word's grammar-checking feature to highlight, say, all adverbs in a document? :-)

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

    Re: macro to highlight parts of speech? (2003)

    No, that is not possible. It highlights errors, not specific features.

  3. #3
    Lounger
    Join Date
    Apr 2003
    Location
    Salt Lake City, Utah, USA
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macro to highlight parts of speech? (2003)

    What I was thinking of was making a macro that would go through a document and highlight in yellow (or whatever the chosen color is) all of the adverbs. I've created a rudimentary macro that searches for "ly" followed by a space or period, but then it catches words like "family" -- which of course is a noun. I thought that since Word does have a fairly sophisticated dictionary that underlines grammatical errors, that somewhere internally it must be able to identify what part of speech each word is. I was hoping someone might know how to access that, because I'd also like to catch excessive prepositional phrases as well. :-)

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

    Re: macro to highlight parts of speech? (2003)

    The internal working of the grammar checker is not available to VBA, so you'd have to write your own code, which is not easy as you have found.
    I haven't been able to find add-ins for Word that do this.

  5. #5
    Lounger
    Join Date
    Apr 2003
    Location
    Salt Lake City, Utah, USA
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macro to highlight parts of speech? (2003)

    Well, I had to ask! Thank you so much for taking the time to respond, Hans. :-)

Posting Permissions

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