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

Free Support Forum - aspose.com

Clobbering the CustomDocumentProperties

I’m having an issue with Aspose.Words using Word 2007 documents and SharePoint properties.

If I save a document from SharePoint to disk, open it in Word and view the properties they are all present and correct with values. If I open it with Aspose.Words none of the correct values are listed only the default / empty values and whats worse if I save the document with Aspose.Words it completely clobbers / removes the custom properties from the document so that when I re-open in Word the properties are no longer listed.

Is there a workaround / what am I doing wrong / are there additional steps to preserve custom properties?

Thanks!
Garrett

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Which version of Aspose.Words do you use? Also, please attach sample document here for testing. I will investigate the issue and provide you more information.

Best regards.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I tried to open/save your document using Aspose.Words and all CustomDocumentProperties are preserved. Could you also send me your output document? I will compare your result and my.

Best regards.

Hi Alexey

Did you get the files I sent over ok?

Thanks
Garrett

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. As I can see custom document properties are the same in both documents you have attached. I attached archive that contains custom.xml of both your documents. As you can see values in both XML files are the same.

Best regards.

Hi Alexey

Open up the first document (before.docx) in Word 2007 and go to Prepare > Properties and you’ll see the list of properties for that document, then compare them with the after.docx

The after.docx no longer has the correct properties, they’ve been stripped out by Aspose.Words, this does not occur during a regular Word 2007 open, modify and save

Regards
Garrett

Hi Garrett,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I did exactly the same as you mentioned. I cannot see any differences between your original document and document processed by Aspose.Words. All custom properties shows the same values as in the original document.

Here is what I see in the Propertied/Custom in both documents:

Property name

Before

After

ContentType

Administration - 1 Year

Administration - 1 Year

ContentTypeId

0x010100078F95F4D9654042A71382DC18DD

E883040076E4F531BFB8E74EAB17EB1E1DFC87CB

0x010100078F95F4D9654042A71382DC18DD

E883040076E4F531BFB8E74EAB17EB1E1DFC87CB

DMS Location

-

-

Document Author

-

-

Document Keywords

-

-

Document Origin

-

-

Document Owner

-

-

GPMS

Not Protectively Marked

Not Protectively Marked

Information Type

-

-

Item Date

-

-

Last Review Date

-

-

Publish to CMS

No

No

Send to Records Centre

No

No

Summary

-

-

“-” means that there are no value.

Best regards.

Yeah Alexey

I just looked, Aspose.Words completely removes the customXml directory from the before.docx file. Is there any setting to work around this or is it a new bug?

Regards
Garrett

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Aspose.Words does not support custom XML at the moment. This is the issue #3046 in our defect database. I will notify you as soon as this feature is implemented.

Best regards.

Hi Alexey

Yes the properties are the same if you just compare the xml files within the docx but not if you compare the properties as reported by and within word.

It doesn’t support customXML, thats fine but why does it remove it? Is there any temporary workaround as this is a major issue for me and for any likely future SharePoint users!

Thanks
Garrett

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank for your inquiry. Actually, I compared custom properties in MS Word. MS Word shows the same as in XML file.

Aspose.Words does not support custom XML and does not preserve custom XML while roundtrip. Unfortunately, I cannot suggest any workaround regarding this issue at the moment.

Best regards.

Thats strange Alexey

On my instance of Word 2007 the before and after document properties are shown very differently in Word. The after seems to revert to the basic document property set.

Is the problem being worked on in a future version?

I have no idea why MS Word on my side shows the same values in both documents, but on your side, properties are different. Maybe MS Word fills them during opening.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Unfortunately, I cannot promise that custom XML will be supported in the next version. It is very complex task and it can take a lot of time to support this feature. currently, I cannot give you any reliable estimate.

Best regards,

The issues you have found earlier (filed as 3046) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(25)