![]() |
#2
|
||||
|
||||
![]()
En supposant que ce sont des champs de formulaire existants et les tables sont dans le corps du document et non dans des boîtes de texte:
Code:
Sub Example() Dim bProtected As Boolean If Not ActiveDocument.ProtectionType = wdNoProtection Then bProtected = True ActiveDocument.Unprotect Password:="" End If If ActiveDocument.FormFields("CheckBox211").CheckBox.Value = True Then ActiveDocument.Tables(2).Rows(2).Range.Font.Hidden = False Else ActiveDocument.Tables(2).Rows(2).Range.Font.Hidden = True End If If bProtected = True Then ActiveDocument.Protect _ Type:=wdAllowOnlyFormFields, _ NoReset:=True, _ Password:="" End If lbl_Exit: Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 2010 protection password cleared on conversion to Word 2003 | Smallweed | Word | 0 | 05-06-2014 07:38 AM |
Pasting tables from Excel 2010 into Word 2010 - How to fix column widths? | GracieB | Word | 7 | 10-02-2013 06:24 AM |
embed excel 2010 into word 2010 using VBA | molesy | Excel | 1 | 09-11-2013 01:08 PM |
![]() |
RichardP | Word VBA | 6 | 04-26-2012 04:22 AM |
![]() |
robby | Word | 3 | 04-18-2012 06:37 PM |