#1
|
|||
|
|||
Use Macros to add a new row in protected document
Let me start by saying the only things I know of macros is what I've read on the internet today so far. I have a word document that's a fillable form, and in it I have 2 tables that I would like the option of adding additional rows if needed. I'd like the new row to have the same formatting as the row above it (text entry, combo drop down boxes, etc) I found some macros code that sort of started to do what I wanted, but an error would pop up. I now understand the process of adding the macro and using it in the table cell "on exit", And that it needs to be in a docm format- I just need the proper code to make it do what I want. Is there anywhere i can find that? I've attached the document for reference. Thank you for your help! |
#2
|
||||
|
||||
Look at the example code at http://www.gmayor.com/word_vba_examples_2.htm - especially 'An alternative method of adding a row to a protected table'
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
||||
|
||||
Since you're using formfields, see the demonstration document in this post: https://www.msofficeforums.com/word-...html#post38312
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
Quote:
Microsoft Visual Basic Run Time Error 4605 This method or property is not available because no text is selected Have I done something wrong? |
#5
|
|||
|
|||
Quote:
Microsoft Visual Basic Run Time Error 438 Object doesn't support this property or method Is there a step I haven't taken? Thanks! |
#6
|
||||
|
||||
It seems you are using the Mac version of Word, which I hadn't noticed . The code is unlikely to work on the Mac version. It also won't work in tables that have split/merged cells, like those in your first table, but the PC version should work in your other tables.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#7
|
|||
|
|||
I was able to make it work! I just had to rename the cells
Thank you for your help!! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a Password Protected Template with Macros | eking | Word | 3 | 12-20-2016 01:05 PM |
Macros don't work in password protected file. | Auto | Excel Programming | 2 | 06-29-2016 12:17 AM |
Enable watermark in a protected document | erickalves05 | Word | 2 | 10-17-2014 10:26 AM |
embedded links in protected document | John147 | Word | 1 | 08-10-2014 04:18 AM |
Using bookmarks in a protected document | Bill Stemp | Word | 0 | 10-16-2010 06:47 AM |