Insert Field Not Working

Hi Roman,

I am trying to insert a field in the document. I have written the following codes to do that:

objDocBuilder.InsertField(‘TextPopData’,‘’);

Before that, I have open the doc object and also created the docbuilder object. My Form field name is ‘TextPopData’. It gives me an error as follows:

Error Type:
Aspose.Word (0x80131500)
Field TEXTPOPDATA is not supported. Please report this file to word@aspose.com.
/Standard Document/CreateStdDoc.asp, line 163


Please help me on this

thanks

Prasenjit

I don’t think TextPopData is a valid Word field.

If you want to insert a merge field, you need to do this:

builder.InsertField(@“MERGEFIELD TextPopData * MERGEFORMAT”, “”);

Hi Roman,

Thanks for your help, but I need to insert the form field into the document. You have given the example of Merge field insertion. But in case of our requirement, the document is form field protected and information in the field can be modified by the User in later time. So we can’t do this with Merge Field. Could you please give me some support on that.

Thanks

Prasenjit

Just want to clarify things one last time.

You want to be able to insert Word form fields (editbox, checkbox and combobox) into the document, is that right? Or maybe you just want to change values in existing form fields in the document?

Yes Roman,

I want exactly that. For the time being I need only the Text Field to insert.

Thanks

Prasenjit

I’ve released Aspose.Word 1.6.10 with new DocumentBuilder.InsertTextInput method to insert text form fields.

DocumentBuilder builder = new DocumentBuilder(doc);

builder.InsertTextInput(“Test1”, TextFormFieldType.RegularText, “”, “”, 0);
builder.InsertParagraph();
builder.InsertTextInput(“Test2”, TextFormFieldType.NumberText, “0.00”, “123”, 5);

Hi Roman,

I really don’t have anything to say about your Support. This is really great. Could you please help me in one more issue. How long you take to complete the AcceptAllChanges() functionality issue? I can’t explain how much it is important for us.

Thanks

Prasenjit