As far as I'm aware, there is no means to use code to digitally sign a VBA
project.
What you can do (provided you have the appropriate digital signature
available) is add code to an existing signed project, either by using the
VBE object or the OrganizerCopy method.
The way you could handle this in your application would be to open an
existing blank document which you have signed, add the necessary code and
content to it, then save it under a new name. All that can be done
programmatically.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
> Dear all,
> i would like to know if there is a mean to sign programmatically some vba
[quoted text clipped - 18 lines]
> Thank you for your inputs
> Best regards
Herve cadieu - 07 Nov 2005 20:23 GMT
Dear Jonathan ,
Thank you much for your input.
Can you tell me more about how to load an empty project holding signed
macros to establish the new document with embeded smartness?
Could you provide me a skeleton of code snippet ?
You can see about my authenticated Grapho-Lock documents on the web by
searching grapho-lock with google.
I make the pond over the bond between dynamically verified handwritten
signature and digital signature...
thank you in advance
Grapho-lock@noos.fr for additionnal discussions
> As far as I'm aware, there is no means to use code to digitally sign a VBA
> project.
[quoted text clipped - 30 lines]
> > Thank you for your inputs
> > Best regards
Jonathan West - 08 Nov 2005 11:33 GMT
Hi Herve,
You might need to have the document pre-loaded with a dummy module that
contains nothing but a comment or two, just so there is a VBA project
present for you to sign.
You can then use the OrganizerCopy method to copy modules from other
templates. You can look up the OrganizerCopy method in the VBA Help.
One thing you must be aware of - both the source and destination files must
not have no password protection on their VBA projects. If either file has a
VBA project password, OrganizerCopy (and any other method of transferring
code) will fail.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
> Dear Jonathan ,
> Thank you much for your input.
[quoted text clipped - 49 lines]
>> > Thank you for your inputs
>> > Best regards
Herve cadieu - 08 Nov 2005 14:48 GMT
Thank you much Jonathan
Ok I undestand now why my code was not embeded with ! it is beacuse I was
setting a password in the vba project...
Ok then
and what about with a com add-in ?
Should it be possible from a com add-in as far as you know ?
What if I was trying to derive from the main object application ?
sincerely
herve
> Hi Herve,
>
[quoted text clipped - 63 lines]
> >> > Thank you for your inputs
> >> > Best regards
Jonathan West - 08 Nov 2005 15:17 GMT
I can't think how a COM add-in could possibly be of any help to you in this
case. You can't import or export VBA modules from a COM add-in.
I have to say that overall I think this whole approach is very problematical
and I doubt you are going to get it to work. How about you describe in
simple terms what you are trying to achieve. We might be able to think of a
completely different approach.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
> Thank you much Jonathan
> Ok I undestand now why my code was not embeded with ! it is beacuse I was
[quoted text clipped - 83 lines]
>> >> > Thank you for your inputs
>> >> > Best regards