Signatures in VBA

If, for some God aweful reason, you intend to use signature lines in your spreadsheet the following code may help you extract said signature data.

Sub sigtest()

Dim cnt As Integer
Dim ss(1 To 10) As String
Dim tempval(1 To 10) As String
Dim objsigsetup As SignatureSetup

cnt = 1

    Do While cnt <= ActiveWorkbook.Signatures.Count
        tempval(cnt) = ActiveWorkbook.Signatures(cnt).Signer
        ss(cnt) = ActiveWorkbook.Signatures(cnt).Details.SignatureText
        ss(cnt) = ActiveWorkbook.Signatures(cnt).Setup.SuggestedSigner
       
        cnt = cnt + 1
    Loop

cnt = 1
Do While tempval(cnt) <> “”
    Cells(cnt, 1).Value = tempval(cnt)
    Cells(cnt, 2).Value = ss(cnt)
    cnt = cnt + 1
Loop

End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: