mardi 14 février 2017

Word 2016 VBA - How can I cycle through all Form Fields, skipping Check Boxes, and change them all to Regular Text?

To clarify, my company works with Microsoft Word 2016 Applications that are covered in Form Fields in addition to Check Boxes. The Form Fields can have Numbers, Dates and just Regular Text as shown below:

Test Form Field Options

We have already created a macro to eliminate the Help Text in each FormField, due to a new SOP, throughout the active document as shown below:

Sub FillInHelpRemoval()
Dim fld As FormField
    For Each fld In ActiveDocument.FormFields
            fld.StatusText = ""
    Next
End Sub

The problem I'm having is trying to figure out how to add to the macro above a way to cycle through each Form Field, skipping Check Boxes, changing each one of them to have the attributes below...

TextInput.EditType Type:=wdRegularText, Default:="", Format:=""

...no matter if the TextInput.EditType Type is wdNumberText or wdDateText.

This would help eliminate many more clicks and steps needed to process our work.

Any possible help, assistance or guidance would be greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire