The Excel workbook essentially has a single cell associated with each checkbox in the Word document. The word document has a group of 12 check boxes per item. The first checkbox in the word document associates with cell B4, second checkbox with cell C4, third checkbox with cell D4 etc. to M4. Then it transitions to B5, C5, D5... M5 etc.
The Excel macro I've been testing to pull the data out of the Word document is:
Code:
Sub wrd12()
Dim wrd As Word.Application
Set wrd = CreateObject("Word.Application")
With wrd
.Documents.Open "C:\path\to\word.docx"
.Visible = True
End With
Range("b4").Value = wrd.ActiveDocument.FormFields("check1").Result
Range("c4").Value = wrd.ActiveDocument.FormFields("check2").Result
Range("d4").Value = wrd.ActiveDocument.FormFields("check3").Result
Range("e4").Value = wrd.ActiveDocument.FormFields("check4").Result
Range("f4").Value = wrd.ActiveDocument.FormFields("check5").Result
Range("g4").Value = wrd.ActiveDocument.FormFields("check6").Result
All the way to cell M350~ / the end of the document. The format in the Excel sheet isn't necessarily a straight row or column which is why I was looking to bookmark each check box accordingly, however manually entering bookmarks for some 3000~ check boxes leaves a lot of room for error and is time consuming - so I'd like to automate the bookmarking of the check boxes. If there's a better way I should be looking at this please let me know.
Thanks