power-tools-for-xml

How to access and replace text in certain paragraphs using OPENXML powertools case by case

牧云@^-^@ 提交于 2019-12-11 11:11:56
问题 I am trying to redact some word files using c# and openxml. I need to do controlled replace of the numbers with certain phrase. Each word file contains different amount of info. I want to use OPENXML powertools for this purspose. I used normal openxml method to replace but it very unreliable and gets random errors such as zero length error.I used regex replace and that seems to work but it replaces it through out the document which is highly undesirable. Here is some snippet of the code :