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:
look specific text in document
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
Post a Comment