none
Importing existing certificate(digital signature) into a document in Microsoft Word 2013 using VBA RRS feed

  • Question

  • Hi

    I need to import a certificate which is installed in my local computer into a word document using VBA. But when I go to Tools->Digital Signature , the certificate does not appear in the list of certificates . There is an option called Choose but when I click that I get an error message as follows:

    "No usable signing certificates are available. Please insert your smart card or contact system administrator to obtain a signing certificate."

    But the certificate in my local is a valid certificate. Someone please help

    Friday, August 8, 2014 1:19 PM

All replies

  • Hi bvidhyaa

    What kind of certificate is this? There are different kinds. In order to use one in Tools/Digital Signature it would need to specifically be a CODE signing certificate. There's also a kind that can be used to digitally sign documents, which could be used inside the document in order to let people know that you, personally, endorse the document's content. But such a certificate cannot be used to sign VBA code.


    Cindy Meister, VSTO/Word MVP, my blog

    Sunday, August 10, 2014 3:35 PM
    Moderator
  • Hi bvidhyaa,

    Additional information:

    According to the message "Please insert your smart card or contact system administrator to obtain a signing certificate.", please take a look at Obtain a digital certificate to create a digital signature.<o:p></o:p>



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, August 11, 2014 6:49 AM
    Moderator
  • Hi

    Thanks for the reply Cindy and George. I am pretty sure that it is a code signing certificate with .cer extensoin and issued by 'Verisign Class 3 Code Signing 2010 CA'. I was able to import the same certificate through VBA in Word2007 in Windows XP. I was not able to import it in Word2013 in Windows 7 Professional through VBA. That is my concern.

    Monday, August 11, 2014 7:16 AM
  • Hi Bvidhyaa,

    It looks like 'Verisign Class 3 Code Signing 2010 CA' can't be supported in Word 2013.

    I would suggest you consulting certificate provider to check whether this certificate can be used in Word 2013.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, August 11, 2014 7:52 AM
    Moderator
  • Hi

    If so, can you please provide the list of vendors that Word 2013 is compatible with.It would be really helpful.

    Thursday, August 14, 2014 11:40 AM
  • Hi,

    First, did the certificate install successfully?

    According to What is a digital signature?

    A digital signature is an electronic security mark that can be added to files. It allows you to verify the publisher of a file and helps verify that the file has not changed since it was digitally signed.

    If the file does not have a valid digital signature, there is no way for you to be sure that the file is actually from the source it claims to be from, or that it has not been tampered with (possibly by a virus) since it was published. It's safer to avoid opening the file unless you know for certain who created it and whether the contents are safe to open.

    Even a valid digital signature does not verify that the contents of the file are harmless. You must decide if you should trust the contents of the file based on the identity of the publisher and where you are downloading the file from.

    And Add or remove a digital signature in Office files:

    To make these assurances, the content creator must digitally sign the content by using a signature that satisfies the following criteria:

    • The digital signature is valid.
    • The certificate associated with the digital signature is current (not expired).
    • The signing person or organization, known as the publisher, is trusted.

     Important   Signed documents, which have a valid time stamp, are considered to have valid signatures, regardless of the age, or revocation status, of the signing certificate.

    • The certificate associated with the digital signature is issued to the signing publisher by a reputable certificate authority (CA).

    You could try using this certificate in other programs to check whether it is available or not.

    Second, I haven't found any document as you want, here is what I found:

    Plan digital signature settings for Office 2013

    Digitally Sign a Word 2002 Document and Programmatically Retrieve Digital Signature Information

    SignatureSet Collection

    Regards,

    George


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 15, 2014 2:12 AM
    Moderator
  • Hi

    Thanks George. But this is not a digital signature for documents . It is a code signing certificate which is imported to a word document through VBA. The process was successful with MSWord2007 in Windows XP Professional OS. After import, the document was opening through MSWord2013 too without any issues. The same is not compatible with MSWord2013 in Windows 7 Premium ie) import is not happening in this combo. I need to know if this is OS dependent or MSWord dependent. Please move this forum to Windows 7 forum if you think that's appropriate


    • Edited by bvidhyaa Tuesday, August 19, 2014 11:59 AM
    Tuesday, August 19, 2014 11:59 AM
  • Hi Bvidhyaa,

    To determine the issue, you could try using this certificate in other programs. If the result is same, suppose this is related to OS. If so, since this thread has been for a while, I would suggest posting a new thread in Windows 7 forum instead.

    To get support for Windows 7, please refer to Support for Windows 7.

    Regards,

    George


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 20, 2014 3:10 AM
    Moderator
  • Hi

    I have a certificate for digitally signing macros in my Word document. I was successfully able to import the certificate and use it in Word2007 in Windows XP. But I am not able to use the same certificate in Word2013 in Windows 7 Premium. The certificate was issued by Verisign Class 3 Code Signing 2010 CA. The certificate was successfully imported in my local. But when I try to add it to my Word document I am getting the following error.

    Someone please help resolve this issue. Is the vendor not compatible with Word2013 or Windows 7 ?

    • Merged by Cindy Meister MVPModerator Wednesday, August 27, 2014 2:36 PM same question; original question awaiting response from OP
    Wednesday, August 27, 2014 5:03 AM
  • Same issue using Word16
    Friday, February 22, 2019 4:26 PM