Free Support Forum - aspose.com

Error Attempted to copy a by reference attribute

I have a program which is getting an exception when I try and clone a document. For test purposes, the document is blank. The code (when stripped down) looks like

Dim doc As New Aspose.Word.Document("C:\Test.doc")

Dim styleBase As Document = doc.Clone()

Dim blobData As New System.IO.MemoryStream

styleBase.Save(blobData, SaveFormat.FormatDocument)

Dim tempDoc As Document = styleBase.Clone()

If I don't save the file to a memory stream, I don't get an exception. The error I get is "Attempted to copy a by reference attribute '1172', but the attribute does not expose the complex attribute interface.". The document is attached.

Hi,

Thank you for considering Aspose.

Please make sure you are using the most recent version of Aspose.Word. I do not get the exception running your code.

I am using version 3.2.0

Ok although I’m unable to reproduce the issue, we’ll anyway try to fix it asap.

We have just released Aspose.Word 3.2.1.

  • Fixed exception "Attempted to copy a by reference attribute 'xxx'".

    http://www.aspose.com/Community/Blogs/Roman.Korchagin/

  • I was facing a same problem, thanks for fixing it quickly!