I am translating specific texts within a Word Docx.
I’ve downloaded and have tried Eric’s SearchAndReplace code HERE and it parses the whole Docx and replaces ALL occurrences of the text.
I wish to parse a text list(of object) containing the search and replace values; (stored in sequential order within the Docx document i.e. top to bottom)
Each item within the list, I would like to read the list item, find the paragraph, replace the text while maintaining formatting, and then do the same for the remaining items within the list.
I might add that the list(of object) contains a class with search, replace and the entire paragraph XML, if that helps.
Is there a way to do this? Eric’s code oscillates between OpenXML and XMLdocument I’m having a hard time creating XMLElements to allow Eric’s code to work…
Your advice is greatly appreciated.
regards,
Rusty