This is a migrated thread and some comments may be shown as answers.

Error importing DOCX

5 Answers 123 Views
WordsProcessing
This is a migrated thread and some comments may be shown as answers.
WAF
Top achievements
Rank 1
WAF asked on 04 Oct 2017, 07:00 AM

I to open a docx file to make a mail merge with it, you can download here:

//mega/#CtBHdEDQEmAR74q9awHNqjLou5vF8_Q_pHs9Xgu4z5Y

I receive this error:

SystemCollectionsGenericKeyNotFoundException occurred
  =0x80131577
  Message=The given key was not present in the dictionary.
  Source=
  :
    SystemCollectionsGenericDictionary`2get_ItemTKey key)
    TelerikWindowsDocumentsFlowFormatProvidersDocxImportRadFlowDocumentImportContextGetResourceByResourceKeyString )
    TelerikWindowsDocumentsFlowFormatProvidersDocxModelElementsVectorCreateImageSourceFromRelationshipIdString , IDocxImportContext context)
    TelerikWindowsDocumentsFlowFormatProvidersDocxModelElementsVectorOnAfterReadChildElementIDocxImportContext context, OpenXmlElementBase )
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBase`3OnAfterReadChildElementIOpenXmlImportContext context, OpenXmlElementBase )
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadChildElementsIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadChildElementsIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadChildElementsIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadChildElementsIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadChildElementsIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadChildElementsIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelElementsOpenXmlElementBaseReadIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlModelPartsOpenXmlPartBaseImportIOpenXmlReader reader, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlOpenXmlImporter`1ImportXlsxPartFromArchiveZipArchiveEntry , OpenXmlPartBase part, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFormatProvidersOpenXmlOpenXmlImporter`1ImportStream input, IOpenXmlImportContext context)
    TelerikWindowsDocumentsFlowFormatProvidersDocxDocxFormatProviderImportOverrideStream input)
    TelerikWindowsDocumentsCommonFormatProvidersFormatProviderBase`1ImportStream input)
    TelerikWindowsDocumentsCommonFormatProvidersBinaryFormatProviderBase`1ImportByte] input)
    ProgramTelerikWay) in C:\Users\oscar.WAF\documents\visual studio 2017\Projects\WordTest\WordTest\Program.cs:line 45
    ProgramMainString] args) in C:\Users\oscar.WAF\documents\visual studio 2017\Projects\WordTest\WordTest\Program.cs:line 39

 

Some ideas?

Note: I'm using 2017.3.913 of WPF controls

5 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 05 Oct 2017, 07:43 AM
Hi,

Could you please try to re-send the link to the document as the one from the post doesn't seem correct? You could also submit a support ticket through our ticketing system as there you can attach archives.

Regards,
Tanya
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
WAF
Top achievements
Rank 1
answered on 05 Oct 2017, 08:41 AM

as Link

Link to DOCX file 

Or simply :

//mega/#CtBHdEDQEmAR74q9awHNqjLou5vF8_Q_pHs9Xgu4z5Y

 

It's working for me

0
Tanya
Telerik team
answered on 05 Oct 2017, 10:35 AM
Hello,

Unfortunately, I am still unable to download a document. All I see when I open the link is a gray circle (as in the attached image). I tried to open it in Chrome, Mozilla, and IE - the result is always the same.

Regards,
Tanya
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
WAF
Top achievements
Rank 1
answered on 05 Oct 2017, 12:41 PM

I hosted GitHub:

Link

https://github.com/osjimenez/GitVersionDemo/raw/develop/res/temp.docx

I hope now work for you

0
Tanya
Telerik team
answered on 10 Oct 2017, 11:03 AM
Hi,

Thank you for sharing the new link to the document. Now I was able to test it and found what is causing the error you are getting. The document refers to an image that is not available at the specified location. If you open this document in an application that can visualize DOCX documents, you will get a default image indicating that the one the document referring to is missing.

I logged a task in our portal to handle similar cases without throwing an exception. You can follow its progress by subscribing to the related public item.

Your Telerik points are updated as a token of appreciation for this report.

Regards,
Tanya
Progress Telerik

Tags
WordsProcessing
Asked by
WAF
Top achievements
Rank 1
Answers by
Tanya
Telerik team
WAF
Top achievements
Rank 1
Share this question
or