We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Delete fields in .DOC

Hi everyone!

I have problems with fields when i copy MSWORD documents (.DOC) because i lost the values.

FieldStart -- {CODE} -- FieldSeparator -- {VALUE} -- FieldEnd

On destination file, in fields appears "ERROR!...."

A possible solution could be check all fields (with Aspose.Words), delete and replace them for the values. What do you think? How can i do this? (better with an c# example, please).

I know how check and found nodes, but i don´t know how delete fields. An c# example, please.

Best regards,

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. It is very easy to fill Word document with data using MailMerge, please see the following link to learn more

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/mail-merge-and-reporting.html

During mail merge, merge fields are replaced with values. Also, if you need just remove unmerged merge fields from your document, you can try using MailMerge.DeleteFields method:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.reporting.mailmerge.deletefields.html

I think the code which I provided in another thread will help you to remove fields:

Hope this helps.

Best regards,

Ok andrey, i see it. Thanks. But... how can i replace fields for the values?

Thanks!!!

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Could you please attach your document with fields here for testing? I will check it on my side and provide you more information.

Best regards,

Hi Andrey,

I just do more tests and i have not more problems. I don´t know what was happened.

Only for my knownledge, if i need replace fields by values in the future... how can i do it? Can you reference me to an example?.

Thanks Andrey!!!

Andrey, don´t worry, i am reading about MailMerge links that you posted me before. It´s great!

Thanks!!!

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

It is perfect, that you already found solution. Please let me know in case of any issues. I will be glad to help you.

Best regards,