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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -