Extract blocks of text from word file and insert into SQL Server

Hi,

I read a previous thread about using fields, range, bookmarks, and sections but I’m still confused as to which is the best way to do this. What I would like to do is make a word document and make it into an “offline form”. After the user fills in the fields offline, they can upload it to the server and Aspose.Word will extract the field values and insert them into SQL Server.

Can someone explain what is the best way to approach my case?

Thanks,
Chris

Hi Chris,

Probably in your case the best way is to iterate from the collection of form fields of the document:

foreach (FormField field in doc.Range.FormFields)
{
   string result = field.Result;
   …
   // Implement code for inserting into database
}

Please also see this Programmers Guide topic:

https://docs.aspose.com/words/net/working-with-form-fields/

Is it possible to extract data from the Control Toolbox fields?

The Control toolbox fields are actually OLE2 objects and unfortunately we do not plan on supporting them in the meantime.