Mohonk
asked on
Insert simple macro into word document.
Is there a way to insert a simple macro into a word document so it can then be run by any user who opens the document? I figured out how to modify the normal.dot file to contain the macro but not how to make it easily redistributable.
This is the macro. I basically want to be able to run spell check on a protected document.
Sub SpellCheckForm()
'
' AcceptAllChanges Macro
' Macro created 3/15/2006 by bron
'Sub SCForm()
ActiveDocument.Unprotect
Selection.WholeStory
Selection.LanguageID = wdEnglishUS
ActiveDocument.CheckSpelli ng
ActiveDocument.Protect Type:=wdAllowOnlyFormField s, NoReset:=True
End Sub
This is the macro. I basically want to be able to run spell check on a protected document.
Sub SpellCheckForm()
'
' AcceptAllChanges Macro
' Macro created 3/15/2006 by bron
'Sub SCForm()
ActiveDocument.Unprotect
Selection.WholeStory
Selection.LanguageID = wdEnglishUS
ActiveDocument.CheckSpelli
ActiveDocument.Protect Type:=wdAllowOnlyFormField
End Sub
You can put it in a code module in the document. You don't have to add one - the ThisDocument module is already there in the Microsoft Word Objects 'folder'.
ASKER
Im sorry im a macro novice. Can you please explain how to do this or send me to a tutorial?
Thanks for the quick response!
Thanks for the quick response!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Awesome. It works great. Thanks for the help!
Thank you. If I can get to be 'awesome' at my (advanced) age, that's as good as the 'A' grade