automatically run a sub before or after an another sub execution

P

Pablo Cardellino

Hi,
I have a commercial template that has a set of tools for professional
use (for translators, like me). I'd like to execute some custom code
right after or before the execution of one of its subs. The problem is
that the project is password protected, and though some MVPs told me
days ago that the password is not really secure, I haven't found out how
can I access the project code.

So I've been thinking if Word VBA has an "after sub execution" or a
"before sub execution" event, which I could use.

Is it possible?
 
G

Gordon Bentley-Mix at news.microsoft.com

Pablo,

Accessing the code of a password-protected VBA project technically
constitutes "hacking", so it's doubtful that anyone in this newsgroup will
tell you how to do it. (But that doesn't mean that the information isn't
availabe on the web somewhere... ;-P) Personally, as a vendor of VBA
projects, I wouldn't want anybody accessing my code and effectively stealing
my intellectual property, although I would certainly be willing to work with
any of my clients to customise my code to better fit their needs. I realise
that this may not be possible with "commercial" products, but you could
always ask...

As for a "before / after sub execution" event, I don't think you'll have
much joy without access to the code itself. AFAIK, there is no "generic"
event of this type to use as a trigger for your code. Events in Word are
primarily related to the Word object model itself, and the "commercial"
template you refer to is not part of this object model. Sorry I can't offer
more hope.
--
Cheers!

Gordon Bentley-Mix
Word MVP

Please post all follow-ups to the newsgroup.

Read the original version of this post in the Office Discussion Groups - no
membership required!
 
P

Pablo Cardellino

Hi, Gordon,

first of all thanks for your response.

Gordon Bentley-Mix at news.microsoft.com escribió:
Pablo,

Accessing the code of a password-protected VBA project technically
constitutes "hacking", so it's doubtful that anyone in this newsgroup will
tell you how to do it. (But that doesn't mean that the information isn't
availabe on the web somewhere... ;-P) Personally, as a vendor of VBA
projects, I wouldn't want anybody accessing my code and effectively stealing
my intellectual property, although I would certainly be willing to work with
any of my clients to customise my code to better fit their needs. I realise
that this may not be possible with "commercial" products, but you could
always ask...

Yes, I know, no problem.
As for a "before / after sub execution" event, I don't think you'll have
much joy without access to the code itself. AFAIK, there is no "generic"
event of this type to use as a trigger for your code. Events in Word are
primarily related to the Word object model itself, and the "commercial"
template you refer to is not part of this object model. Sorry I can't offer
more hope.

What a pity there's no such an event... I doubt very much the vendor
would help me, since the new version of the software, released months
ago, is not more a VBA project, but a Java application. So, I will
continue triggering the macros myself.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top