c# - How to skip the empty pages when reading MS Word document with Microsoft.Office.Interop.Word -


i have application reads text ms word document microsoft.office.interop.word this:

microsoft.office.interop.word.document docs         = word.documents.open(ref path, ref miss, true, ref miss,                                                                                       ref miss, ref miss, ref miss, ref miss,                                                                                       ref miss, ref miss, ref miss, ref miss,                                                                                       ref miss, ref miss, ref miss, ref miss);             string totaltext = "";              (int = 0; < docs.paragraphs.count; i++)             {                 totaltext += " \r\n " + docs.paragraphs[i + 1].range.text.tostring();             }                        docs.close();             word.quit(); 

i need value of totaltext after "for".but sometimes, when ms word document have 2 pages content , 100 empty ones extremely slow because reading empty pages too. trying find way skip empty pages.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -