We are developing a small macro to record data relating to information on invoices. The macro creates a long file name associated with the invoice (it includes eleven bits of information) and creates a database of invoices including this file name. We scan hard copies of invoices and save the file in pdf format using the long file name created by the macro. The purpose of the file name is so that a search may quickly retrieve a particular invoice.

Question: Having entered the eleven bits of information, the macro is started - it stores the details in the database and the long file number is copied to the clip board. We would like to expand the macro to include an additional routine that may be started following the insertion of the document (and if necessary opening the scan software - we have an Epson scanner) that will execute the scan instruction and save the pdf file using the file name and return to the excel worksheet ready for entering the details of the next invoice.