Security of VBA-Projects

P

Pierre Gast

Hello,
How can I hide the code of a vba-project in a way that the popup-message
"Project is Unviewable" is shown and not the password-dialogs after clicking
on the + in the project explorer. There are many password-crack-tools which
make the vba-code free for everybody, but this kind of security seems to be
save. I saw it in Word-VBA by the AddIn of "Acrobat-Writer" and AddIn of
"SnagIt".
When I search in www, I only find questions of users which get this message
unwished. I try it out all suggestions I found (certificate; addin in
startup-folder) but it doesn't work, the pw-dlg always is shown.
It's a bug? In this case if there is a reproducable way to generate it, this
could be a useful bug!

Thanks Pierre
 
J

Jezebel

You get the 'Project is unviewable' message if the project is in an add-in
that is not currently open as a file, as is usually the case with add-ins
like PDFMaker. However if you open PDFMaker.dot as a file then try to view
the project you'll get the password dialog instead. There's nothing buggy
about it, it's just the way Word works.

The security is the same in both cases. If that's not good enough security
for you, write your application in VB, and compile it.
 
P

Pierre Gast

I try it out and in deed for the PDFMaker it works, but I found another dot
of another application where this behaviour seems to be independed of the
kind this dot is opened. Even if I rename it to doc and open it I always get
the "Project is unviewable". This shows that there is a (secret) way in
creating this. This could be the absolute crack-security and every developer
should be interessted in this.

Thanks Pierre
 
J

Jezebel

"absolute crack" in what sense? If you're getting the 'project is
unviewable' message, you have not, in fact, opened the document containing
the VBA code.

What are you trying to do? -- secure a project of your own, or crack someone
else's?
 
P

Pierre Gast

of course I only want to protect my own vba-project. But in the case when
the pw-dlg is shown, this pw is crackable with the tools you can get in the
internet, but under the condition when the "Project is unviewable" it is not
crackable (or more difficult), that the reason why I'm looking for the
solution to make my distributed project "unviewable".
 
J

Jezebel

As explained, 'unviewable' is just the condition of the code project being
loaded or not. There isn't anything else to it.
 
J

Jonathan West

Pierre Gast said:
of course I only want to protect my own vba-project. But in the case when
the pw-dlg is shown, this pw is crackable with the tools you can get in
the internet, but under the condition when the "Project is unviewable" it
is not crackable (or more difficult), that the reason why I'm looking for
the solution to make my distributed project "unviewable".

There is no mechanism for providing more security on VBA projects than the
project password, provided you still implement your code in a template.

There are therefore two options available to you.

1. Move all your code into a COM-add-in, written in VB6 or similoar
language. This article will help you
Creating a Microsoft Office 2000 COM Add-in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dno2kta/html/mso2kaddin.asp

2. Move most of your code into a VB6 ActiveX DLL, and call the functions of
the DLL from the small amount of remaining code in your Word add-in.
 

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