Quote:
Originally Posted by Catty
I have a print macro for word and one for excel. I want to combine these two.
|
Since the Word and Excel object models are quite different and the files they work with are entirely different, I doubt you'll be able to do this in a straightforward way.
In any event, unless your print macro is re-written as a vbscript (which is stored in a file on its own and requires it own automation by each calling application), you can't have the two applications call the shared macro without each application having a macro of its own to call the shared one, which kind of defeats the purpose.
If the code isn't re-written as a vbscript and one application hosts the macro, whichever application doesn't host it will have to automate the other one to do the printing on it's behalf, thus requiring far more code than you'll ever be likely to save.