Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I have a form (protected but no password) that I use to teach Soldiers
the proper format to wirte a military operations order. I would like to have the capability to check spelling without having to unlock the form. I have tried the spell check macro found at the site below and intalled it accordind to instruction at the site below it. http://word.mvps.org/FAQs/MacrosVBA/...ProtectDoc.htm http://www.gmayor.com/installing_macro.htm Unfortunately, it did not work for me. I am running MS Word 2007. Is there something that needs to be changed in the code to account for the new Word document formats? Or is there something else that I need to do? |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I seem to recall (without taking the time to confirm) that the original
macro only worked with legacy form fields, however the following macro should check the spelling throughout the document Sub SpellCheckForm() Dim i As Integer Dim bProtected As Boolean 'Unprotect the file If ActiveDocument.ProtectionType wdNoProtection Then bProtected = True ActiveDocument.Unprotect Password:="" End If ActiveDocument.Range.Select 'Change language as appropriate Selection.LanguageID = wdEnglishUK Selection.Range.CheckSpelling 'Reprotect the document. If bProtected = True Then ActiveDocument.Protect _ Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" End If End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Anthony wrote: I have a form (protected but no password) that I use to teach Soldiers the proper format to wirte a military operations order. I would like to have the capability to check spelling without having to unlock the form. I have tried the spell check macro found at the site below and intalled it accordind to instruction at the site below it. http://word.mvps.org/FAQs/MacrosVBA/...ProtectDoc.htm http://www.gmayor.com/installing_macro.htm Unfortunately, it did not work for me. I am running MS Word 2007. Is there something that needs to be changed in the code to account for the new Word document formats? Or is there something else that I need to do? |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
On Sep 16, 7:58 am, "Graham Mayor" wrote:
I seem to recall (without taking the time to confirm) that the original macro only worked with legacy form fields, however the following macro should check the spelling throughout the document Sub SpellCheckForm() Dim i As Integer Dim bProtected As Boolean 'Unprotect the file If ActiveDocument.ProtectionType wdNoProtection Then bProtected = True ActiveDocument.Unprotect Password:="" End If ActiveDocument.Range.Select 'Change language as appropriate Selection.LanguageID = wdEnglishUK Selection.Range.CheckSpelling 'Reprotect the document. If bProtected = True Then ActiveDocument.Protect _ Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" End If End Sub -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org Anthony wrote: I have a form (protected but no password) that I use to teach Soldiers the proper format to wirte a military operations order. I would like to have the capability to check spelling without having to unlock the form. I have tried the spell check macro found at the site below and intalled it accordind to instruction at the site below it. http://word.mvps.org/FAQs/MacrosVBA/...ProtectDoc.htm http://www.gmayor.com/installing_macro.htm Unfortunately, it did not work for me. I am running MS Word 2007. Is there something that needs to be changed in the code to account for the new Word document formats? Or is there something else that I need to do?- Hide quoted text - - Show quoted text - Thanks for the prompt reply. I found a macro already that worked but I will try yours to see which I like better. |
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
On Sep 16, 7:32 pm, Anthony wrote:
On Sep 16, 7:58 am, "Graham Mayor" wrote: I seem to recall (without taking the time to confirm) that the original macro only worked with legacy form fields, however the following macro should check the spelling throughout the document Sub SpellCheckForm() Dim i As Integer Dim bProtected As Boolean 'Unprotect the file If ActiveDocument.ProtectionType wdNoProtection Then bProtected = True ActiveDocument.Unprotect Password:="" End If ActiveDocument.Range.Select 'Change language as appropriate Selection.LanguageID = wdEnglishUK Selection.Range.CheckSpelling 'Reprotect the document. If bProtected = True Then ActiveDocument.Protect _ Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" End If End Sub -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org Anthony wrote: I have a form (protected but no password) that I use to teach Soldiers the proper format to wirte a military operations order. I would like to have the capability to check spelling without having to unlock the form. I have tried the spell check macro found at the site below and intalled it accordind to instruction at the site below it. http://word.mvps.org/FAQs/MacrosVBA/...ProtectDoc.htm http://www.gmayor.com/installing_macro.htm Unfortunately, it did not work for me. I am running MS Word 2007. Is there something that needs to be changed in the code to account for the new Word document formats? Or is there something else that I need to do?- Hide quoted text - - Show quoted text - Thanks for the prompt reply. I found a macro already that worked but I will try yours to see which I like better.- Hide quoted text - - Show quoted text - After reviewing the macro fron your previous posting and comparing it to the one I found at another site, the macros are exactly the same except for the name. If you wrote it the first time, "Thanks" and there is someone else who is passing the macro off as his own. BTW, is there a way to slightly modify this so that it checks each field upon exit without looping through every field in the form? Thanks, for your help. |
#5
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
There is no rocket science involved in this macro - I suspect that there may
be several similar versions around - but there are plagiarists out there, so what was the link? Let's see what else has been duplicated? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Anthony wrote: On Sep 16, 7:32 pm, Anthony wrote: On Sep 16, 7:58 am, "Graham Mayor" wrote: I seem to recall (without taking the time to confirm) that the original macro only worked with legacy form fields, however the following macro should check the spelling throughout the document Sub SpellCheckForm() Dim i As Integer Dim bProtected As Boolean 'Unprotect the file If ActiveDocument.ProtectionType wdNoProtection Then bProtected = True ActiveDocument.Unprotect Password:="" End If ActiveDocument.Range.Select 'Change language as appropriate Selection.LanguageID = wdEnglishUK Selection.Range.CheckSpelling 'Reprotect the document. If bProtected = True Then ActiveDocument.Protect _ Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" End If End Sub -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org Anthony wrote: I have a form (protected but no password) that I use to teach Soldiers the proper format to wirte a military operations order. I would like to have the capability to check spelling without having to unlock the form. I have tried the spell check macro found at the site below and intalled it accordind to instruction at the site below it. http://word.mvps.org/FAQs/MacrosVBA/...ProtectDoc.htm http://www.gmayor.com/installing_macro.htm Unfortunately, it did not work for me. I am running MS Word 2007. Is there something that needs to be changed in the code to account for the new Word document formats? Or is there something else that I need to do?- Hide quoted text - - Show quoted text - Thanks for the prompt reply. I found a macro already that worked but I will try yours to see which I like better.- Hide quoted text - - Show quoted text - After reviewing the macro fron your previous posting and comparing it to the one I found at another site, the macros are exactly the same except for the name. If you wrote it the first time, "Thanks" and there is someone else who is passing the macro off as his own. BTW, is there a way to slightly modify this so that it checks each field upon exit without looping through every field in the form? Thanks, for your help. |
#6
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
On Sep 17, 12:52 am, "Graham Mayor" wrote:
There is no rocket science involved in this macro - I suspect that there may be several similar versions around - but there are plagiarists out there, so what was the link? Let's see what else has been duplicated? -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org Anthony wrote: On Sep 16, 7:32 pm, Anthony wrote: On Sep 16, 7:58 am, "Graham Mayor" wrote: I seem to recall (without taking the time to confirm) that the original macro only worked with legacy form fields, however the following macro should check the spelling throughout the document Sub SpellCheckForm() Dim i As Integer Dim bProtected As Boolean 'Unprotect the file If ActiveDocument.ProtectionType wdNoProtection Then bProtected = True ActiveDocument.Unprotect Password:="" End If ActiveDocument.Range.Select 'Change language as appropriate Selection.LanguageID = wdEnglishUK Selection.Range.CheckSpelling 'Reprotect the document. If bProtected = True Then ActiveDocument.Protect _ Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" End If End Sub -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org Anthony wrote: I have a form (protected but no password) that I use to teach Soldiers the proper format to wirte a military operations order. I would like to have the capability to check spelling without having to unlock the form. I have tried the spell check macro found at the site below and intalled it accordind to instruction at the site below it. http://word.mvps.org/FAQs/MacrosVBA/...ProtectDoc.htm http://www.gmayor.com/installing_macro.htm Unfortunately, it did not work for me. I am running MS Word 2007. Is there something that needs to be changed in the code to account for the new Word document formats? Or is there something else that I need to do?- Hide quoted text - - Show quoted text - Thanks for the prompt reply. I found a macro already that worked but I will try yours to see which I like better.- Hide quoted text - - Show quoted text - After reviewing the macro fron your previous posting and comparing it to the one I found at another site, the macros are exactly the same except for the name. If you wrote it the first time, "Thanks" and there is someone else who is passing the macro off as his own. BTW, is there a way to slightly modify this so that it checks each field upon exit without looping through every field in the form? Thanks, for your help.- Hide quoted text - - Show quoted text - Here is the link: http://www.vbaexpress.com/kb/getarticle.php?kb_id=388 Also, is it possible to modify the macro to check each field individually as it exits instead of looping through the form upon exiting the final text form field? Thanks. |
#7
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Anthony wrote:
Here is the link: http://www.vbaexpress.com/kb/getarticle.php?kb_id=388 Also, is it possible to modify the macro to check each field individually as it exits instead of looping through the form upon exiting the final text form field? Thanks. Thanks for the link. As for checking each field on exit, it should be possible but it would need extensively modifying to determine which field you were leaving and then you would have to unlock, check the spelling and relock on exit from each field. This I feel is not really a viable option. If you wish to persist, I suggest you direct the question to the vba forum where there are enthusiasts who may have the time and inclination to provide the extra code ![]() -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org |
#8
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
On Sep 18, 3:23 am, "Graham Mayor" wrote:
Anthony wrote: Here is the link: http://www.vbaexpress.com/kb/getarticle.php?kb_id=388 Also, is it possible to modify the macro to check each field individually as it exits instead of looping through the form upon exiting the final text form field? Thanks. Thanks for the link. As for checking each field on exit, it should be possible but it would need extensively modifying to determine which field you were leaving and then you would have to unlock, check the spelling and relock on exit from each field. This I feel is not really a viable option. If you wish to persist, I suggest you direct the question to the vba forum where there are enthusiasts who may have the time and inclination to provide the extra code ![]() -- Graham Mayor - Word MVP My web sitewww.gmayor.com Word MVP web sitehttp://word.mvps.org Thanks for the assistance. What you have written will work just fine. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Spell checking form fields | Microsoft Word Help | |||
How do I enable spell checking on form entries? | Microsoft Word Help | |||
spell checking a locked form | Microsoft Word Help | |||
MS Word XP doesn't allow spell checking in a protected document. | Microsoft Word Help | |||
Getting Spell Checking in a Protected Document | Microsoft Word Help |