The .docx file is a report from an outsourcer,
I want to extract the data associated with the respective categories to reformat their report and automatically assess inconsistencies; such as when their math is erronious, or when a category has no data.
If I manually open the .docx file and copy everything (ctrl+a), then past it into an excel sheet, the only consistency I have found is that the left aligned categories have their corresponding data somewhere to the right. I know enough about standard cell manipulations to search cells for the category name, then look for the contents of all right aligned cells in the same row and remove any extraneous spacing / tabbing. They are inconsistent with including some data in formatted tables, and some without. Pasting into excel seems to strip all that away to something I can work with.
For example, if the following was part of their report:
I would like to copy this content out of the docx file, paste it directly into the workbook as a new excell sheet, add a new row to represent this entry in Sheet0, concatenate the values of type and system, copy over their time data without the extra spaces, carry over their time elapsed, then calculate the real time elapsed and flag it by changing the cell colour if there is a discrepancy.
I know that's a lot, but at the moment I am just looking for a way to copy and paste the contents of a docx file into an excell sheet using a VBA macro based in the excel sheet for every .docx file in a single folder.
Bookmarks