Thanks for your inquiry. In case you are using an older version of Aspose.Words, I would suggest you please upgrade to the latest version (v13.4.0) from here:
The ASK and FILLIN fields are the examples of fields that prompt the user for some response. Please implement IFieldUserPromptRespondent
interface and assign it to the UserPromptRespondent
property to establish interaction between field update and the user.
method returns a response from the user on prompting. Your implementation should return null to indicate that the user has not responded to the prompt (i.e. the user has pressed the Cancel button in the prompt window).
Please use the following code snippet to achieve your requirements. Hope this helps you.
public class HandlePrompts : IFieldUserPromptRespondent<o:p></o:p>
Respond(string promptText, string defaultResponse)
// User response (i.e. confirmed value contained in the
if (promptText == "What
is the date?")
return DateTime.Now.Date.ToString("dd MM yyyy");
doc = new Aspose.Words.Document(MyDir
doc.FieldOptions.UserPromptRespondent = new HandlePrompts();
//save output document
doc.Save(MyDir + "Out.docx");