how to sign form 16 digitally from excel – digital signature in TDS form 16

Hello,

Please read the following guide to understand how to signed digitally multipal TDS Form 16 pdf files using the Excel VBA code made by Ajit Sir.

How to digitally signed form 16 from Excel using VBA Code:-

  1. Open Excel file and Click on Developer tab to go on VBA project screen
  2. Click on Insert option and insert a new module
  3. Copy below VBA code (Add Digital Signature to PDF) and paste in module
  4. Add Pfx File path to call/select digital signature certificate for signing
  5. Add Password of certificate
  6. Add PDF full path and name with .pdf in Inputfile to signed
  7. Add PDF full path and name with .pdf in outfile to Save output
  8. Press F5 OR run macro 2 times to signed
  9. That’s All.
Sub DigitalSignedPDFCode()
Dim SignedPDF, FileCount, PFX_pass, strSignFName, inputpdf, epass, outputpdf
Dim pdfPDDoc As New AcroPDDoc, oJS As Object, oSign As Object, oPpklite As Object
Dim oSignInfo As Object
Dim ResultLogin As Boolean
Dim ResultSign As Boolean
Dim arr() As String
Set pdfPDDoc = CreateObject("AcroExch.PDDoc")
Set oJS = pdfPDDoc.GetJSObject
Set oPpklite = oJS.security.getHandler("Adobe.PPKLite", True)
             
strSignFName = "PFX CERTIICATE PATH"
PFX_pass = "PFX PASSWORD"
inputpdf = "PDF FILE FOR SIGN"
outputpdf = "PDF FILE AFTER SIGNED"             
               
'Page 1
Set oFields = oJS.AddField("SignatureField", "signature", 0, Array(80, 220, 255, 250))
Set oSign = oJS.GetField("SignatureField")
ResultLogin = oPpklite.login(PFX_pass, strSignFName)
oPpklite.setPasswordTimeout PFX_pass, 60
arr = Split("", ",")
ResultSign = oSign.signatureSign(oPpklite, arr, outputpdf)

oPpklite.logout
pdfPDDoc.Close
Set oJS = Nothing
Set oSign = Nothing
Set oPpklite = Nothing
Set pdfPDDoc = Nothing

End Sub

We have all HR and Payroll Calculation and solutions in Excel and we believe and Excel automation, this is one of them. for more details visit www.99Excel.Com or write to us AT : support@99excel.com

Thanks, Team Payroll Automation