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

Free Support Forum - aspose.com

Aspose Words - Access field names

Received : 2007/10/02 07:18:59
Message : Hi

We have field names that are XML documents. We cant read the field names using GetFieldNames() because that goes up to the first apostrophe. How can we do this using Aspose Words?



This message was posted using Aspose.Live 2 Forum

Thanks for your request. You can use the following code to get names of mergefields.

Document doc = new Document(@"in.doc");
string[] names = doc.MailMerge.GetFieldNames();

Best regards.