Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ActiveDocument.CheckSpelling (Word97/SR2)

    From Help: "Syntax 1: Begins a spelling check for the specified document or range. If the document or range contains errors, this method displays the Spelling" etc

    I'm stumped. I'd been thinking for years that I could test the results of an overall spell-check on an entire document, but now I see that I can't.

    Question: Am I mistaken?

    I've previously written code to loop through text checking a word at a time (Syntax2), and I have code that checks the spelling during the document close event, but now I'm being a tad more ambitious (I want to pursue a series of documents and record the names of those which fail a spell-check for future analysis).

    I can see nothing in the Lounge, or the Help files, that indicates the availability of a returned result, as in:
    <pre> If Active.Document.CheckSpelling Then .... </pre>


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

    Re: ActiveDocument.CheckSpelling (Word97/SR2)

    Look up CheckSpelling in the Object Browser (press F2 to activate it.) You'll notice that CheckSpelling is listed several times.

    The CheckSpelling method of the Application (and Global) object is a function that returns a Boolean. This method is used to check a single word.

    The CheckSpelling method of the Document and Range objects is a procedure, it doesn't return anything.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveDocument.CheckSpelling (Word97/SR2)

    Hans, thanks for the prompt reply

    >CheckSpelling is listed several times
    Not in my Word97/SR2; I see it just once.

    > it doesn't return anything
    Thanks. I'm not going bonkers.

Posting Permissions

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