Hi Nhue,
Thanks for your inquiry. Unfortunately, currently, there is no way to insert Signature Line into a document using Aspose.Words. Your request has been linked to the appropriate issue. You will be notified as soon as this feature is supported. The features IDs are WORDSNET-656 and WORDSNET-2852. We apologize for your inconvenience.
In your case, I suggest please create a template document with Mail Merge fields and use simple mail merge to achieve your requirements. I have created a sample document and attached with this post. The last section of document contains mail merge fields as signature. Please use the following code snippet to merge fields and protect last section of document which contains the signature fields. Hope this helps you.
<span style=“font-size:
10.0pt;font-family:“Courier New”;color:#2B91AF;mso-no-proof:yes”>Document<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”> doc = new Document(MyDir
-
“signature.docx”);<o:p></o:p>
doc.MailMerge.Execute(
new
string[] { "SignerName",
"Title", "SignedBy"
},
new
object[] { "Nhue",
"Manager", "Nhue luong" });
// Section
protection only works when document protection is turned and only editing in
form fields is allowed.
doc.Protect(ProtectionType.AllowOnlyFormFields);
// By default,
all sections are protected, but we can selectively turn protection off.
doc.LastSection.ProtectedForForms
= false;
doc.Save(MyDir + "out.docx");