Adding digital signature programmatically

R

ril

Hi,
I have an application, developed in Delphi 6 using the Excel97 type
library, which creates excel workbooks dynamically.
I have to add digital signature to the macros that are added to these
workbooks and I noticed that this could be done manually in the VB
Editor for a whole VBA project.

Is there a way to have my macros digitally signed programmatically
(i.e. at the point when the workbook is being created by the Delphi
code)?

I am neither a VB, nor a security expert, so any hint will be greatly
appreciated, thanks!
 
S

Stephen Bullen

Hi Ril,
Is there a way to have my macros digitally signed programmatically
(i.e. at the point when the workbook is being created by the Delphi
code)?

One way is to start with an empty, signed, workbook, then provide the
name of that workbook to the Workbooks.Add method. You can then add
code to that workbook and save it, keeping the signature.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk
 
R

ril

Thanks a lot, Stephen,

Your suggestion is what I actually resorted to doing.
It works well with Excel 2002, but Office 2003 seems to have different
ways of managing the stuff, as I can't seem to produce signed
workbooks on a machine with Excel 2003.

Still trying to find a way around that. If anyone has had a similar
problem, I'll be interested in hearing how you coped with it.

Thanks,
RIL
 

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