I have searched the MSDN, it only gives an example how to add digital signature to protect the entire workbook:
ActiveWorkbook.Signatures.AddNonVisibleSignature "{00000000-0000-0000-0000-000000000000}"
but VBAProject does not contain any method to add a signature, the only way is:
Steps for manual:
- Open excel file --> Alt + F11 (to open VBA project)
- Tools --> Digital Signature --> Choose --> Select Certificate --> OK
- Save
Is there any way to do this pragmatically, or any other suggestions?