C
caverjay
I use the following code to automate the digital signing of word
documents. Most of my users use Word 2003, but some use 2007. This
doesn't work with 2007, it creates the file, but does not digitally
sign it. Occasionally, I have a user that states that it just does
not work (no error message). Any thoughts?
Private Sub Sign_Click()
Dim WshShell As Object
Dim SpecialPath As String
Dim Lvalue As String
Dim Sig As Signature
Dim MyOrt As String
Dim Doc As Object
Set WshShell = CreateObject("WScript.Shell")
SpecialPath = WshShell.SpecialFolders("Desktop")
Set Doc = ActiveDocument
Lvalue = Format(Date, "yyyymmdd")
MyOrt = InputBox("Initials")
Doc.SaveAs (SpecialPath & "\" & Lvalue & "-" & MyOrt & "-QAForm")
Set Sig = ActiveDocument.Signatures.Add
ActiveDocument.Signatures.Commit
MsgBox "File saved to desktop and signed."
End Sub
documents. Most of my users use Word 2003, but some use 2007. This
doesn't work with 2007, it creates the file, but does not digitally
sign it. Occasionally, I have a user that states that it just does
not work (no error message). Any thoughts?
Private Sub Sign_Click()
Dim WshShell As Object
Dim SpecialPath As String
Dim Lvalue As String
Dim Sig As Signature
Dim MyOrt As String
Dim Doc As Object
Set WshShell = CreateObject("WScript.Shell")
SpecialPath = WshShell.SpecialFolders("Desktop")
Set Doc = ActiveDocument
Lvalue = Format(Date, "yyyymmdd")
MyOrt = InputBox("Initials")
Doc.SaveAs (SpecialPath & "\" & Lvalue & "-" & MyOrt & "-QAForm")
Set Sig = ActiveDocument.Signatures.Add
ActiveDocument.Signatures.Commit
MsgBox "File saved to desktop and signed."
End Sub