DocX icon indicating copy to clipboard operation
DocX copied to clipboard

can not support doc?

Open Charltsing opened this issue 2 years ago • 3 comments

i test a docx with only 3 pictures

using (var document = DocX.Create(docpath))
            {
                foreach (var section in document.Sections)
                {
                    foreach (var paragraph in section.Paragraphs)
                    {
                        foreach (var pic in paragraph.Pictures)
                        {
                            //
                        }
                    }
                }
            }

but Sections.count=1, Paragraphs.count=0, document.Pictures.count=0, so i can not read picture. can you help me?

spire.doc works fine

Charltsing avatar Feb 08 '23 03:02 Charltsing

Hi,

By reading the code you submitted, I can see you are creating a docx and then trying to parse the sections/paragraphs/Pictures. But if you create a docx, it will be empty, so it's normal that it contains only 1 section, along with no paragraph/picture.

Thank you

XceedBoucherS avatar Feb 09 '23 20:02 XceedBoucherS

sorry, i make a mistake

docx can not support doc format? docx is fine

Charltsing avatar Feb 10 '23 11:02 Charltsing

Hi DocX supports MS Word docx format. It can support MS Word doc format, but it's not garanteed. Thank you

XceedBoucherS avatar Feb 10 '23 12:02 XceedBoucherS