check box form fields count 
Author Message
 check box form fields count

Can anyone tell me please how to count the number of
formfields in a document which are specific types i.e
checkbox.

I can count the total formfields in the document but can
fathom how to only count the ones which are check boxes.

Cheers in anticipation.

Fred



Wed, 09 Nov 2005 16:34:13 GMT  
 check box form fields count
Hi Fred,

Use:

Dim aff As FormField, Counter As Integer
Counter = 0
For Each aff In ActiveDocument.FormFields
    If aff.Type = wdFieldFormCheckBox Then
        Counter = Counter + 1
    End If
Next aff
MsgBox "There are " & Counter & " checkboxes in the document."

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP

Quote:
> Can anyone tell me please how to count the number of
> formfields in a document which are specific types i.e
> checkbox.

> I can count the total formfields in the document but can
> fathom how to only count the ones which are check boxes.

> Cheers in anticipation.

> Fred



Wed, 09 Nov 2005 17:12:01 GMT  
 check box form fields count
Doug

Once again thanks for your help.

Fred

Quote:
>-----Original Message-----
>Hi Fred,

>Use:

>Dim aff As FormField, Counter As Integer
>Counter = 0
>For Each aff In ActiveDocument.FormFields
>    If aff.Type = wdFieldFormCheckBox Then
>        Counter = Counter + 1
>    End If
>Next aff
>MsgBox "There are " & Counter & " checkboxes in the
document."

>Please respond to the newsgroups for the benefit of
others who may be
>interested.

>Hope this helps
>Doug Robbins - Word MVP

message

>> Can anyone tell me please how to count the number of
>> formfields in a document which are specific types i.e
>> checkbox.

>> I can count the total formfields in the document but
can
>> fathom how to only count the ones which are check
boxes.

>> Cheers in anticipation.

>> Fred

>.



Wed, 09 Nov 2005 21:28:04 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to: Loop through all objects and count the checked check boxes

2. Form Field Check Box

3. Writing Macro with Check Box Form Field

4. Form Field Check Box

5. Form Field Check Box

6. Need help w/Protected document with form text fields and check boxes

7. Form Field Check Box

8. Need Item Count Field on Form?

9. Yes/No Field and Check Box help

10. Help on making a table Boolean field into a Check Box using VBA

11. using REF field with check boxes

12. Check Box in Field Formula?

 

 
Powered by phpBB® Forum Software