Consulting

Results 1 to 3 of 3

Thread: checkbox help!

  1. #1

    checkbox help!

    I have a MS Word document which is a form containing 3460 checkboxes*!! I cannot dictate the format of this document - IOW, its handed to me and I have to deal with it. None of the 3460 checkboxes have a name ("bookmark" value in the properties dialog box are all empty). There is no logic in this form - for example it has a yes checkbox and a no checkbox and you can check both as an answer to one question...yeah, yeah, I know... it isnt a well thought out form, but I cannot control this....it is what it is.

    I can enumerate the checkboxes using a VBA macro. But I cannot figure out how to identify the checkbox on the page, I need some way to identify the page, or anchor point or something for each checkbox, since their order may be all over the place. The only apparent identifying characteristic of a given checkbox is its visual location on the page.

    So I am thinking that I need to run a macro to set the bookmark value for every checkbox fist (I cant figure out how to do this), save the document (now with named checkboxes, so at least I know which one is where) and then run a second macro to export all the data to a spreadsheet so that it can be sorted and filtered and corrected etc. Then I will need a third macro to import the corrected data back from the spreadsheet into Word.

    Am I going down the wrong path here? Any other thoughts on how to attack this problem?

    * the document is a Defense Security Service imposed form containing all the Risk Management Framework NIST 800-53 controls which we are required to address. The form must be completed and submitted back to DSS without changing the form, just checking the various checkboxes and filling in text areas. Its completely unmanageable in MS Word, since you can't, for example, list all the controls that are checked as "implemented".

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Exporting the data to Excel doesn't require bookmarking the checkboxes or any knowledge of their page or position on the page. What you'd want, though, is some means of differentiating the data in Excel. That could be achieved by exporting both the checkbox value and, for example, the contents of the paragraph it's in or the page # & relative position on the page.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    If these are check box form fields or content controls, you might find http://www.gmayor.com/ExtractDataFromForms.htm useful, which includes tools for naming the form fields/content controls and for converting form fields to content controls (as they process much faster - though for a single form this may not be an issue.)
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •