c# - Modifying a paragraph added using InsertParagraphAfter() -
var p1 = document.paragraphs.add(ref o); p1.range.insertparagraphafter();
now want grab paragraph created using insertparagraphafter() , modify it. how can access it?
insertparagraphafter
supposed extend current selection include new paragraph. if start creating empty selection @ end of existing paragraph, current selection should set new paragraph after calling insertparagraphafter
.
note have not tested following code (i have not tried compiling it), may way off.
var p1 = document.paragraphs.add(ref o); // set selection end of paragraph. document.range(p1.range.end, p1.range.end).select(); p1.range.insertparagraphafter(); // insertparagraphafter should expand active selection include // newly inserted paragraph. var newparagraph = document.application.selection;
Comments
Post a Comment