Using only OpenXML I'd like to replace text within a single paragraph

Home Forums Open-Xml-Sdk Using only OpenXML I'd like to replace text within a single paragraph

This topic contains 0 replies, has 1 voice, and was last updated by  Rusty 1 year, 1 month ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #11146

    Rusty
    Participant

    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

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.