Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2021, 02:54 AM
zxmon21 zxmon21 is offline Prompt for digital signature Windows 10 Prompt for digital signature Office 2016
Novice
Prompt for digital signature
 
Join Date: Sep 2021
Posts: 3
zxmon21 is on a distinguished road
Unhappy Prompt for digital signature

Hi,
I have a Word template that contains a digital signature line added by Insert -> Signature line -> Microsoft Office Signature Line. The template is of course NOT signed.

The user will enter data, and finally submit the document by pressing a macro button. The button does stuff like
  • do some checks on the content of the document
  • save the document into the correct network folder

I want to prompt the user to digitally sign the document if that hasn't already happened. I can reference SIGNED signature-lines. How can I reference UNSIGNED signature lines?

I can create a NEW signature line and sign it with
Code:
ActiveDocument.Signatures.AddSignatureLine.Sign vardelsuggsigner:="Name of the user", vardelsuggsignerline2:="Engineer (job title)", varsigimg:="John", vardelsuggsigneremail:="John@doe.com"
but that brings up the Signature Setup dialogue. Any parameters the user enters that are not even used later:


Then the sign method kicks in:




The resulting signature looks good, ignoring what the user entered earlier:



I want to prepare a signature-line with details, so my users fill in as little as necessary. Who can help me to reference the UNSIGNED signature line? Then the macro should do something like
Code:
ActiveDocument.SignatureLines(1).Sign
but SignatureLines only contains SIGNED SigLines
Reply With Quote
  #2  
Old 10-17-2021, 04:05 PM
Guessed's Avatar
Guessed Guessed is offline Prompt for digital signature Windows 10 Prompt for digital signature Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 2,724
Guessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to behold
Default

This is an interesting conundrum on something I haven't ever explored in Word.
I found a clue on ExcelForum by a user called marvinparanoidandroid which greatly helps. Unfortunately you will likely be required to create a free account there to see his answer.
Can you try this code on your document?
Code:
With ActiveDocument.Signatures
    .Subset = msoSignatureSubsetSignatureLinesUnsigned
    If .Count > 0 Then      'at least one unsigned signature in doc
      .Item(1).Sign
    End If
End With
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
signatureline

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
macOS Digital signature in excel ki_ha1984 Excel 0 10-05-2019 05:31 AM
Timestamp information in digital signature? Tuuska Word 0 10-11-2018 06:41 AM
Prompt for digital signature an easy way to attach digital signature erikrn Outlook 3 09-13-2015 11:46 AM
Prompt for digital signature Digital Signature Alkaufmann Word 2 05-28-2015 04:22 PM
Digital Signature invalidates all others? JCWrs Word 0 03-08-2013 04:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft