Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

Macro unprotect doc, make change and re-protect?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ann Scharpf - 11 Apr 2006 21:00 GMT
We are running Word 2003 under Windows XP.  Under Word 97, I created forms
templates that had instructional comments.  When we upgraded to Word 2003,
everyone HATED how the comments were always displayed as those margin
balloons.  So I modified the templates to remove the instructions.

Problem is when people work on old documents.  I am creating a toolbar to
add to the template for people to do functions that they've never learned the
right way to do.  I'd like to have a button for removing all the comments.  
But you can't remove the comments without unprotecting the form.  I don't
know VBA yet and am trying to record a macro that will first turn off the
protection, then remove all the comments and turn the protection right back
on.  Can't record a macro this way because you can't record the macro if
protection is turned on.  Can't back into it either and edit the macro
because if protection is turned off and I turn on as first step of macro, it
kills the record.

Is there some way I can accomplish this?

Thanks for your advice.

Ann
Charles Kenyon - 11 Apr 2006 21:40 GMT
Unprotect manually, record your macro and save. Then edit the macro to start
it by unprotecting and finish by protecting.
http://word.mvps.org/FAQs/MacrosVBA/ModifyRecordedMacro.htm
http://word.mvps.org/FAQs/MacrosVBA/TurnFmFlfResetOff.htm
Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> We are running Word 2003 under Windows XP.  Under Word 97, I created forms
> templates that had instructional comments.  When we upgraded to Word 2003,
[quoted text clipped - 20 lines]
>
> Ann
Ann Scharpf - 11 Apr 2006 23:14 GMT
Thank you!  That worked like a gem.  I copied the code out of the document in
the second link and it did just what I needed.  

> Unprotect manually, record your macro and save. Then edit the macro to start
> it by unprotecting and finish by protecting.
[quoted text clipped - 24 lines]
> >
> > Ann
Charles Kenyon - 12 Apr 2006 06:54 GMT
Glad to have been able to help point the way.
Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> Thank you!  That worked like a gem.  I copied the code out of the document
> in
[quoted text clipped - 38 lines]
>> >
>> > Ann

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.