Combine document style exception

Hello I am trying to combine two documents with the code below and get an exception:

This property is only allowed for list styles.

On the last row: WordDocument.Save(FilePath);

can you help me? is it a known bug? version 4.0.2

I have attached the problematic word file I am trying to combine with a new one.

// Open the source document.

Document srcDoc = new Document(_originalFilePath);

// For a twist, let's say I want the second document to start on the same page where

// the first document ends. This is controlled by a property of the first section.

srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;

// Combine the documents, see the function below.

AppendDoc(WordDocument, srcDoc);

// Sets the file to be not read only (sometimes the file is readonly and it is failed)

try

{

System.IO.FileInfo info = new System.IO.FileInfo(FilePath);

info.IsReadOnly = false;

}

catch { /* Eat this - just don't set to read only */ }

// Save the finished document.

WordDocument.Save(FilePath);

Thanks for reporting this problem to us. I have reproduced it and logged to our defect base as issue #1359. We will try to fix it in the next hotfix which will be published in a few weeks.

Paragraph with the following text ניסיון תעסוקתי seems to cause the trouble. I will let you know if I will be able to find a workaround for it.

Sorry for inconvenience.

Best regards,

The problem is fixed in Aspose.Words 4.0.5.