This message was posted using Email2Forum by ShL77.
This message was posted using Email2Forum by ShL77.
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. Of course, you can achieve this using Aspose.Words. In your case, you can use form fields to achieve this:
You can build your document in MS Word and insert form fields in it. Then, I think, you should protect this document in order to allow the end user to modify only form fields in the document (see that attached example.)
Once your end user fill form fields with data and upload the document back to the server, you can read data from the form fields using Apsose.Words. Here is code example:
// Open document.
Document doc = new Document(@"Test001\in.doc");
// Get data from form fields.
// Text inputs
string firstName = doc.Range.FormFields["FirstName"].Result;
string lastName = doc.Range.FormFields["LastName"].Result;
// Combobox
string gender = doc.Range.FormFields["Gender"].Result;
// Checkbox.
bool isMaried = doc.Range.FormFields["IsMaried"].Checked;
// Here is your DataBase staff to write these data into your DB.
// .................................
Hope this helps.
Best regards.