Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    You're right in that it's simple. However, spell check for forms has been the subject of this forum & the MVP site many time. There are certain bugs with the system shown. For one thing, a user can go outside the spell check dialog box & make changes to the boilerplate form. The macro which covers as many possibilities as possible, & to which our own Geoff Whitfield contributed, is found at
    http://www.mvps.org/word/FAQs/MacrosVBA/Sp...kProtectDoc.htm

    Nevertheless, if you aren't running grammer check & aren't worried about users changing the form, then unprotecting, spellchecking, & reprotecting without resetting fields works.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    This is not working either. The probelm I think I am having is that the Language settings is on Engish, but the proofing has a greyed out check mark in it. Pressing CTRL A to select entire report, then Language...uncheck the "don't proof" check box..as soon as I return, its right back again. How do I get the grey check mark OUT completely.
    I used his code, and its not happening.
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  3. #3
    3 Star Lounger
    Join Date
    May 2001
    Location
    Burlington, KS, USA
    Posts
    209
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    You are correct. Protecting the document removes proofing again in form fields.

    Taking a look at the SpellCheckForm macro, I can see where one line of code (indicated in Bold) could make the difference:

    <pre>ActiveDocument.Unprotect Password:=""
    Selection.HomeKey Unit:=wdStory
    Selection.WholeStory
    With Selection
    .LanguageID = wdEnglishUS
    .NoProofing = False
    ActiveDocument.CheckSpelling
    End With
    ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
    </pre>

    I have checked this, and it appears to work. Hope this is what you were looking for.
    The postings on this site are my own and do not necessarily represent the position or opinion of WCNOC.

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    Lonelywind,
    I kiss you on the forehead. You are an angel. You solved it. You would laugh at me, if you have seen what I have been through the last couple days trying to get this thing to work. You are absolutely the GREATEST!
    I salute you, I kiss your forehead, I salute you again.
    3 cheers for Lonelywind...you 'da man.
    Nannette <img src=/S/kiss.gif border=0 alt=kiss width=34 height=15>
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Spellcheck in Protected Form (Word)

    I hope that this helps users out there looking to Spellcheck a word form that is protected. I have read other methods that are absolutely exhaustive and miles of code long. This is the fastest and easiest way I have ever seen. I don't want my users to unlock the form with password, so where the "" empty brackets are for passwords are in this code, I put the password for form in to unprotect, spellecheck, and when spellcheck is through, reprotect the form without their knowledge that it was ever unprotected for even a fraction of a moment while they were running spellcheck. Look into this if this helps you.
    Protecting the Form

    Form documents must be protected for the form fields to work. The last button on the Forms toolbar, which looks like a padlock, allows you to quickly protect the form while you are creating it to ensure that your form fields work as planned. However, to truly protect your form prior to actually using it, go to Tools-Protect document, and choose Forms. Give it a password if you like.

    Warning: When you protect the form, fill it out, and then decide to change something in the form, you must unprotect it. If you unprotect it, fix that item, then re-protect your form, all of your filled-in form fields will be empty again! Word 2002 (XP) retains the information, lesser version do not.

    In order to unprotect the form in Word 2000, you must use the following code before and after your procedure:

    Before:

    ActiveDocument.Unprotect Password:=""

    After:

    ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""

    Warning: You may have protected your form, but anyone can create a new document from it simply by opening a blank document, and hitting Insert-File, and inserting your form document. Your form is now unprotected. The good thing is that if you forget the password for your form, you can use the same method to unprotect it and then re-protect it.

    Spellchecking a Form

    After completing your form, your users may want to spellcheck it. The spellcheck option is grayed-out and unavailable. The form must be unprotected, spellchecked and then re-protected. You will not want to let your users do this because they may lose the entries they've made. Visual Basic for Applications code is required to work around this. This is available for download on their TipWarez page!
    http://www.thewordexpert.com/tipwarez.htm#CuteQuiz
    Scroll down and click on the link to "Download "MYFORMSPELLER NOW"...It works beautifully.

    NMPadgett
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  6. #6
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Quakertown, PA, Pennsylvania, USA
    Posts
    517
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    I found you, Nanette!
    [img]/forums/images/smilies/smile.gif[/img]
    And I have duly fixed the download!
    (Did I spell that right?)

    Thank you, Gary!

  7. #7
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Spellcheck in Protected Form (Word)

    Hi Dreamboat,

    Good luck on your new site!

    I see you haven't included us as a link for Word information - are we not worthy? <img src=/S/devil.gif border=0 alt=devil width=15 height=15>

    Gary F.

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    Your Not? I have all MVP site listed, and if you would like ( I would)...If you have a Particular URL site to list, let me know, and I shall do. Woodys Lounge is listed on several places in my new site, in the sidebar on first page, at the bottom of first page, and again on my reference page, as the first link. I want to guide my students to ALL sites that have as friendly and helpful people as all of you.
    Thanks again so very much,
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  9. #9
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Quakertown, PA, Pennsylvania, USA
    Posts
    517
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    Gary:

    You know darn good and well that if I put a link to this site, they will never come back to mine!!

    Actually, I'm holding a resentment against one of your members who seems to question everything I say and do. I have left the lounge twice because of it.

    The only thing that brought me back this time was that wopr showed up in my stats (as a result of Nanette's post), so I came to see what was being said about TheWordExpert at Woody's! [img]/forums/images/smilies/smile.gif[/img] Of course, I felt a bit honored by it.... Then I found it was because of an error in that code--and we all know Dreamboat doesn't *really* do code--and was somewhat disappointed.

    However, the code is now fixed, and I've edited the description to say that it's a *lightweight* version.

    Since then, I've decided I don't care if it was because of an error, because the error isn't there anymore. And isn't that what it's all about? Helping users? And not having stupid mistakes that puzzle them more than their original question?

    But it is surely nice to see you, Gary! I will link to Woody's directly if only because you've asked. [img]/forums/images/smilies/smile.gif[/img]

    And it surely is nice to see that Nanette's got the solution she wants! Thanks, Nanette. The code would still be bad if it weren't for you. Also, Nanette, if you ever need to reach me, please use ONLY this email:
    Dreamboat@TheWordExpert.com -- not that *other* one, which serves a completely different purpose. Sorry for the confusion there.

  10. #10
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    DreamBoat,

    I will be sure to put a link onto my students website for you too. I feel that any and all help should be made easy to attain, and not spend 3 hours searching. Woody's is on my site, because these folks have helped me enormously over the past 2 years, and never once, ever got weary of me...well if they did (and imagine at times wearyofNan=True has happened)...well, they never showed it. I would be lost without them. And you, have showed me even more with your site and your helpful code lines. I am glad that your code now is perfected, and we thank Lonelywind and his diligence for that. I am awed at all who have the ability to answer and do it so cheerfully. I teach MS Office from 8-4 every day to our Military folks, and The WordExpert, and WOPR, and Woody's lounge will always stay at the top of my daily referrels.
    Thanks all,
    Until the next Office Gremlin,
    NMPadgett
    CCCC
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  11. #11
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    I have a scenario for you. This may be why your code didn't work all the time, only some of the time.
    I have found that I needed to "remove" that line of .NoProofingtools=FALSE in the 97 Version of Word, because there is no such choice in that version. However, it must remain in Word 2000. Hope that helps. The folks I made this for, well half of them have Word 97 and the other half have Word 2000 and had to make 2 copies of the incident report template in order to make it work for everybody. One with extra line of code in, and one with extra line of code out. So you might want to create a "Light version 97" with it out.
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  12. #12
    3 Star Lounger
    Join Date
    May 2001
    Location
    Burlington, KS, USA
    Posts
    209
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    Or, as an alternative, you could have your macro figure out what version of Word is running, and execute that line of code only if Word 2000 is running. This could be accomplished in the aforementioned SpellCheckForm macro as follows:

    <pre>ActiveDocument.Unprotect Password:=""
    Selection.HomeKey Unit:=wdStory
    Selection.WholeStory
    Selection.LanguageID = wdEnglishUS
    x = Application.Version
    If Left$(x,1) = "9" then
    Selection.NoProofing = False
    End If
    ActiveDocument.CheckSpelling
    ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
    </pre>


    This way, you could have one macro that works both in Word 97 and in Word 2000.
    The postings on this site are my own and do not necessarily represent the position or opinion of WCNOC.

  13. #13
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    You guys are soooo good [img]/forums/images/smilies/smile.gif[/img]
    But it keeps stopping on the line
    x = Application.Version
    how come?
    should i put the version number there, and in the parenthisis where the x is also at?
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  14. #14
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    What about something like

    <pre>#if vba6 then
    Selection.Noproofing = false
    #end if</pre>

    This is a compiler directive- if it's not vba6 then the statement will not compile.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  15. #15
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck in Protected Form (Word)

    I get a compile error: Variable not defined with that one.
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

Page 1 of 2 12 LastLast

Posting Permissions

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