PDA

View Full Version : Can VBA be used to search a folder of .docx's for text strings and copypaste to Excel



sadsmileyfac
12-28-2016, 04:08 PM
I've got kind of a complicated problem and I'm not so sure if there is an answer to it.

I have to do a manual process of going through lots of .docx files, finding text strings and recording information in an Excel spreadsheet. It's done daily. The Word files contain (amongst a lot of other things) this information (explanatory parenthesis is mine for the example, no brackets in the actual files):

Inspection Type: (this is a category)
Inspection Classification: (another category)
Inspected: (this is a location name)
Inspector: (this is a username)
Inspection Start: (this is a date / time stamp)
Inspection End: (this is a date / time stamp)So I would have an Excel sheet with 6 columns, and upon each successive row, the contents I've taken from each document. This takes up a lot of time over a month.

Could a macro do this task- search though a folder of Word files and grab whatever comes after ": " to paste to Excel?

Kenneth Hobs
12-28-2016, 08:11 PM
Welcome to the forum!

Yes.

It would be best to post simple obfuscated files for us to use in the solution process. Click the Go Advanced button in lower right of a reply, scroll down and click Manage Attachments hyperlink, browse and upload file(s).