Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Running a macro on a protected document.
I have created a macro that will add lines to a table with the appropriate
form fields in each cell. However, I don't want people changing any other part of the document except for being able to edit the form fields and add additional lines to the table. Can I run a macro on a protected document? If not, the only other option is to add a table with a style and then allow editing of that style. Will that work also? Thank you! |
#2
|
|||
|
|||
Kara wrote:
I have created a macro that will add lines to a table with the appropriate form fields in each cell. However, I don't want people changing any other part of the document except for being able to edit the form fields and add additional lines to the table. Can I run a macro on a protected document? If not, the only other option is to add a table with a style and then allow editing of that style. Will that work also? Thank you! Hi Kara, There are two parts to this... getting the macro started, and allowing the macro to make changes in the form. For the first part, provide a toolbar button to launch the macro, as part of your template. See http://word.mvps.org/FAQs/Customizat...oToToolbar.htm for instructions. Although it's possible to use a MacroButton field or a command button instead, it's more trouble than it's worth to try to keep it from printing. For the second part, your macro needs to unprotect the document, insert the new table row, and reprotect the document. See http://word.mvps.org/FAQs/MacrosVBA/...ProtectDoc.htm for example code. Your second proposal won't work, because a style contains only formatting, not table rows or fields. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening a document in a protected form | Microsoft Word Help | |||
Table in a Form | Tables | |||
Form Macro doesn't "stay" when others open the document | Microsoft Word Help | |||
How can I mail merge a 'Protected' document? | Mailmerge | |||
How do I make a document protected so that it can not be changed? | Microsoft Word Help |