![]() |
#2
|
||||
|
||||
![]()
Apart from the >> which should not be present, it works fine
Code:
Sub AddRow() Const strPassWord As String = "password1" If ActiveDocument.ProtectionType <> wdNoProtection Then ActiveDocument.Unprotect Password:=strPassWord End If ActiveDocument.Tables(1).Rows.Add 'If ActiveDocument.ProtectionType = wdNoProtection Then ActiveDocument.Protect _ Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=strPassWord 'End If End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
macro, unprotect, word 2013 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Password protected file no longer offers password dialog on Open | htaylor | Word | 0 | 10-15-2013 12:35 PM |
How to open a password-protected word document? | navalava | Word | 1 | 07-01-2012 12:15 PM |
![]() |
john_ | Outlook | 2 | 07-28-2011 01:43 AM |
![]() |
mistermouse | Word | 5 | 02-16-2011 01:56 PM |
Password Protected Files | gurp99 | Word | 0 | 08-17-2010 03:30 PM |