When there is an abstractNum defined with the same abstractNumId in word\glossary\numbering.xml and in the word\numbering.xml, a "System.ArgumentException: An item with the same key has already been added." exception is thrown.
In other cases, the import overwrites the styles from the main document part with the ones defined in the glossary or fails to import different parts of the content.
Workaround: Delete the glossary files:
string path = "File.docx";
using (Stream str = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite))
{
using (ZipArchive archive = ZipArchive.Update(str, null))
{
foreach (ZipArchiveEntry entry in archive.Entries.ToList())
{
if (entry.FullName.Contains("glossary/"))
{
entry.Delete();
}
}
}
DocxFormatProvider provider = new DocxFormatProvider();
RadFlowDocument flowDocument = provider.Import(str, null);
}