Find string in a .docx file and copy to spreadsheet, then find product codes from catalogue

I’m trying to create a product order spreadsheet. I need a way to automatically grab strings from a .docx file (order.docx) and paste them into a column. Sheet 1 Column A is a catalogue of products (A1=cherries, A2=grapes, A3=apples, A4=bananas). Sheet 2 Column B is associated product codes for each item (B1=453, B2=849, B3=820, B4=889). In Sheet 2, column A reads a .docx file and finds products from Sheet 1 Column A (the catalogue) formatted as a list with commas (grapes, bananas, cherries) and returns the name of each product. Then, Sheet 2 Column B finds the associated product code corresponding to each Sheet 2 column A name and returns that product code from Sheet 1 Column B. Hopefully that makes sense: to summarize, Sheet 2 finds in a .docx file a list of names and returns in column A the list of names and in column B the associated product codes from the Sheet 1 catalogue of names/codes.

For that, you will need to write a macro which may be quite complex to write. A simpler solution would be to copy the order.docx and paste it in a Calc column. Then, to retrieve the product code from the product name, use the function VLOOKUP.

Ah, okay. That’s the step I was trying to skip. But no big deal if it’s too complex.