0

Is there a vba code to search a listed invoice number in an excel list into a word document highlight that line with the matching excel invoice number and print that current page as pdf and name it after that invoice number.

Example: Excel doc Name:Invoices Cell:A1 Cell A1 Contains:invoice 001

Word Doc Name:Remitance Line3 Contains:invoice 001

(Basically vlookup) Then highlight the line invoice 001 Print current page as pdf Name and save that pdf in a folder according to invoice number

Also i hope no errors will occur because some invoices are duplicates but belong to the same company

We have this every week and we need to search the invoice numbers and print it page by page.

Thanks in advance

braX
  • 11,506
  • 5
  • 20
  • 33
ynd101
  • 1
  • 1
  • 1
    Does this answer your question? [How to use VLookup in Word VBA?](https://stackoverflow.com/questions/24294226/how-to-use-vlookup-in-word-vba). You need to narrow the scope of a question or issue, not tell us what the entire project is supposed to do. This question is too broad. – Jeremy Thompson Jun 27 '22 at 00:57
  • You need to use `Find` in Word, using the text of the cell as the text to look for. Once you have written some code you can come back and get help with any issues you get. – Timothy Rylatt Jun 27 '22 at 09:02

0 Answers0