![]() |
|
#1
|
|||
|
|||
|
Hi,
I need a help with WORD FormFields. I have a document with many formfields and I need to update all fields without two of them. One formfield shows amount in words so the field with this amount earlier cant be updated. Could you please help? Macro below with problem on red. I need a part that will update each formfield separately. Sub sbProtectSheet1() ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" ActiveDocument.Unprotect Password:="" ActiveDocument.FormFields("qqq").Result = "XZX" ActiveDocument.FormFields("wng").Result = "3000" Dim dFormField As FormField For Each dFormField In ActiveDocument.FormFields() If dFormField.Name <> "wng" Then dFormField.Update End If Next ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" ActiveDocument.Unprotect Password:="" End Sub |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
locking word table cells while auto-updating fields
|
fingermouse | Word | 6 | 01-14-2015 06:22 AM |
Mailmerge and Formfields
|
Liosis | Mail Merge | 4 | 03-07-2014 12:56 PM |
| Renaming Word Formfields: string too long error | silverspr | Word VBA | 7 | 01-22-2013 06:20 PM |
Help with locking wdPictureContentControl
|
remodel | Word VBA | 1 | 10-25-2012 10:45 PM |
| locking out word | joe | Word | 0 | 11-19-2009 02:09 AM |