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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -