Clearing the form

S

Strobo

Any cleaner/simpler way to clear all checkboxes than to using a loop to
clear them one by one.

I'm asking simply as I have a large number of them in a table and it takes a
very long time to clear them this way.

Thanks
 
D

Doug Robbins - Word MVP on news.microsoft.com

The time taken for the following to run should not be significant

Dim FF As FormField
With ActiveDocument
For Each FF In .FormFields
If FF.Type = wdFieldFormCheckBox Then
FF.CheckBox.Value = False
End If
Next FF
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
S

Strobo

Yes, that is what I am currently doing.

But with over 600 checkboxes in the document it takes just over a minute to
clear them all.
I was hoping there is a 'friendlier' way :)
 
D

Doug Robbins - Word MVP on news.microsoft.com

If the form is a template, or if you save it as a template (with the boxes
unchecked), it may just be quicker to create a new document from the
template.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
S

Strobo

True,

Which is why I'm just going to leave the 'Clear form' feature out.
I was just hoping that there is a way.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top