c# - How to read tables from a particular place in a document? -


when use below line reads tables of particular document:

  foreach (microsoft.office.interop.word.table tablecontent in document.tables) 

but want read tables of particular content example 1 identifier identifier.

identifier can in form of [srs oraganisation_123] identifier [srs oraganisation_456]

i want read tables in between above mentioned identifiers.

suppose 34th page contains identifier want read tables point until come across second identifier. don't want read remaining tables.

please ask me clarification in question.

say start , end identifiers stored in variables called mystartidentifier , myendidentifier -

    range myrange = doc.range();     int itagstartidx = 0;     int itagendidx = 0;      if (myrange.find.execute(mystartidentifier))         itagstartidx = myrange.start;      myrange = doc.range();         if (myrange.find.execute(myendidentifier))         itagendidx = myrange.start;      foreach (table tbl in doc.range(itagstartidx,itagendidx).tables)     {        // code goes here     } 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -