View Single Post
 
Old 04-01-2014, 08:13 PM
macropod's Avatar
macropod macropod is online now Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Catty View Post
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.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote