c# - Search and Add Comment with OpenXML for Word -


i'm newbie openxml sdk.

i need perform following tasks on word docx on server side, , believe openxml sdk first place should into.

so requirements follows:

  1. look specific text in document

  2. add comment in location of found text.

is possible openxml sdk? tried go through docs, , found way search , replace text, couldn't find way add comment in appropriate location.

thanks!

the link ron gave indicate how insert comment. insert want, can find paragraph like

paragraph p = body.descendants<paragraph>().where(p.innertext.contains(searchstring)).firstordefault(); if (p != null) {     // here follow link ron post create comment     // insert comment p p.insertafter() said in link } 

maybe have adapt bit depending matching criteria


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -