Following the guide on:
https://docs.aspose.com/words/net/working-with-fields/
I was having an issue with some word documents and not being able to match the field names for replacement. I added some debug code and found the following:
Debug Code:
response.write("Name: " & mergeField.Name & "")
Result:
Name: «Name»
Fix:
replace(replace(CStr(mergeField.Name),"«",""),"»","")
Is there a reason that the mergefields have «» in their names? Is this consistant? Will my fix be good enough, or do you forsee some issues with it?
This message was posted using Page2Forum from Rename Merge Fields - Aspose.Words for .NET and Java