PatrickJohnson
05-30-2008, 12:59 PM
I currently have a macro in Access that generates and emails an Excel file from one of my stored queries. I have it set to edit the email, then I open the file and perform a formatting macro I wrote in excel to clean up the output into a more readable format. I then save and send, then the Access macro continues.
My question is, can I just have the Access macro run the code that the Excel macro has on the fly without opening the file for edit? I'm trying to limit user inervention at every turn :)
I'm guessing the answer lies somewhere in converting my Access macro to VBA, dropping my Excel macro code into it, and adding some code to open the file and whatnot, run the formatting, then close the file and continue. Thoughts?
My question is, can I just have the Access macro run the code that the Excel macro has on the fly without opening the file for edit? I'm trying to limit user inervention at every turn :)
I'm guessing the answer lies somewhere in converting my Access macro to VBA, dropping my Excel macro code into it, and adding some code to open the file and whatnot, run the formatting, then close the file and continue. Thoughts?