We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word document corruption after OLE link change (UNC notation)

Hi Aspose team,

when I try to make OLE link change saved Word document is corrupted.
I attached sample project and test document (md.docx). Just compile it and run pdf.exe which will create output document md_new.docx.

Btw. I have impression that this happens only when OLE link is in UNC notation. If link is with full drive path then it is ok.

Can you please investigate?

Hi Oliver,


Thanks for your inquiry. After an initial test with Aspose.Words 16.12.0, we were unable to reproduce this issue on our end (see attachment). We would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link:
http://downloads.aspose.com/words/net

Best regards,
Hi Awais,

I am using 16.12.1 so that should be ok.
When you generated Word doc are you able to open it without any issues in Word?
Document can be processed with Aspose.Words but Word is complaining.

I attached only new generated document for your comparison.

Hi Oliver,


MS Word 2013 reports error message upon loading MD_NEW.docx; but MS Word 2016 does not report this error. For the sake of any correction, we have logged this problem in our issue tracking system as WORDSNET-14668. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

@dr_oli,

Regarding WORDSNET-14668, our product team has completed the work on your issue and has come to a conclusion that this issue and the undesired behavior you are observing is actually not a bug in Aspose.Words. So, we will close this issue as ‘Not a Bug’. Please see the following analysis details:

You change host name in file names of OLE links from hla-sbs to ASPOSE DEMO. The new name contains a space. MS Word 2013 raises an exception on opening the output file, ‘The file is corrupted and cannot be opened’.

If we remove a space in the ASPOSE DEMO string in the code, the error disappears.

If we add a space (as encoded as %20 as a simple char) into host name of a link file name in the source document by manual editing of the document.xml.rels part, MS Word 2013 raises the exception too.

Spaces in other elements of file name does not cause the exception.

We cannot try creating a link with a space in host name by using MS Word, since it does not add a non-existent file item into the relationship part, and we cannot change computer name to have a space, MS Windows forbids it.

We have not found mentions of forbidden spaces in link host names in DOCX format documentation.

So, it is not a bug. MS Word 2013 does not allow spaces in host names of link file names. Or maybe it is a bug of MS Word 2013 and earlier, since MS Word 2016 does not raise the exception.

Best regards,