Replacing bookmarks in docx file using OpenXml SDK and C++/CLI
问题 I am trying to replace bookmark in docx with text in c++\cli using open xml SDK concept. The below piece of code will fetch bookmarks from word document and checks whether the bookmark matches the string “VERSION” if it is true, it is replaced with the string “0000” in the docx file. Paragraph ^paragraph = gcnew Paragraph(); Run ^run = gcnew Run(); DocumentFormat::OpenXml::Wordprocessing::Text^ text = gcnew DocumentFormat::OpenXml::Wordprocessing::Text(“0000”); run->AppendChild(text);