question

zequion-0308 avatar image
0 Votes"
zequion-0308 asked StefanBlom-6438 answered

Read the paragraphs of a Word file as quickly as possible

I have a c# function that reads paragraphs from .doc/.docx files. I use the familiar Microsoft system. The problem is that to read a 20mb size file it takes 1 hour and to read a 100mb file it takes all day and I can't use the pc for anything else.

dotnet-csharpoffice-addins-devoffice-word-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CharlesKenyon-8472 avatar image
1 Vote"
CharlesKenyon-8472 answered

Basic problem is that Word does not know what a page is.
https://wordmvp.com/Mac/PagesInWord.html

It does know what a paragraph is (anything followed by a paragraph mark).

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

StefanBlom-6438 avatar image
0 Votes"
StefanBlom-6438 answered

What does the code do with the content it retrieves from the Word document? Perhaps there is a simpler way than going through paragraph by paragraph.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.