+ Reply to Thread
Results 1 to 4 of 4

digital signature on pdf with vba

  1. #1
    Registered User
    Join Date
    09-22-2014
    Location
    tel aviv, israel
    MS-Off Ver
    2007
    Posts
    2

    digital signature on pdf with vba

    hello

    I'm trying to write VBA code that will produce a PDF file signed with a digital signature, would love to get help with code written or guidance on how to do this

    Regards

  2. #2
    Registered User
    Join Date
    09-22-2014
    Location
    tel aviv, israel
    MS-Off Ver
    2007
    Posts
    2

    Re: digital signature on pdf with vba

    Does anyone have a direction what to do ?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: digital signature on pdf with vba

    I suggest you ask in an Acrobat forum.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    10-31-2020
    Location
    US
    MS-Off Ver
    2019
    Posts
    5

    Re: digital signature on pdf with vba

    Found this on the web; searching for the same thing-- it appears osign and oadd are what we're looking for, and it also appears that Javascript is the necessary language to use for adding signatures to pdfs. There is some kind of bug where we can't "pass objects to javascript from vba" and that only strings should be used to communicate between the two languages... and there was also mention that "folder level javascript should be used if trying to auto-sign documents".

    However I merely want to add signature fields to docs, not auto-sign them.
    I will be testing several scripts like below once I find the time.

    Sub PDFSig()
    Dim test As Boolean
    Set acrobatApplication = CreateObject("AcroExch.App")
    Dim gPDDoc As Acrobat.CAcroPDDoc
    Set gPDDoc = CreateObject("AcroExch.PDDoc")
    gPDDoc.Open Environ$("userprofile") & "\Desktop\TestFile.pdf"
    Set jso = gPDDoc.GetJSObject
    Set ppklite = jso.security.getHandler("Adobe.PPKLite", True)
    test = ppklite.login(InputBox("Please enter your password"), "C:\Documents and Settings\josdmoor\Application Data\Adobe\Acrobat\8.0\Security\JoshuaMoore.pfx")
    Set oAdd1 = jso.AddField("Action Form Preparer Signature", "signature", 0, Array(173, 175, 355, 130))
    Set oSign1 = jso.GetField("Action Form Preparer Signature")
    Set oAdd2 = jso.AddField("Authorized Signer", "signature", 0, Array(173, 130, 355, 86))
    Set oSign2 = jso.GetField("Authorized Signer")
    oSign1.signatureSign ppklite

    ppklite.logout

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. do I need digital signature
    By purplewarda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2008, 03:18 AM
  2. set up Digital signature
    By David Overington in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2006, 12:10 AM
  3. [SOLVED] Digital Signature
    By Sandy Mann in forum Excel General
    Replies: 5
    Last Post: 01-11-2006, 08:10 PM
  4. Digital signature
    By TLS in forum Excel General
    Replies: 0
    Last Post: 06-04-2005, 02:05 AM
  5. [SOLVED] Digital Signature
    By JJ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-02-2005, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1