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

Free Support Forum - aspose.com

Field CREATEDATE doesn't work properly after saving document

Hi,

it seems that using of field CREATEDATE doesn’t work properly after saving document with Aspose.

Example:

  • Document (dot) contains field CREATEDATE
  • filedate of newly generated document is today, e.g. 05.07.2010
  • Java code
doc = new Document(TestAsposeCreateDate.LOAD_FILENAME);
builder = new DocumentBuilder(doc);
doc.save(TestAsposeCreateDate.SAVE_FILENAME);



Fieldresult
of CREATEDATE after saving document per Aspose:
e.g. 16.04.2003

I would have expected :
today, eg. 05.07.2010



Thanks
a lot.

Sincerely,
Matthias Schlosser

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

Thanks for your inquiry. You should specify CreatedDate yourself. Please see the following code:

Document doc = new Document("C:\\Temp\\in.dot");

doc.getBuiltInDocumentProperties().setCreatedTime(new Date());

doc.save("C:\\Temp\\out.doc");

Hope this helps.

Best regards.

Hi,

at the moment we are testing the new beta
release of Aspose
Words for Java 10.0

doc.getBuiltInDocumentProperties().setCreatedTime
is not available anymore in Aspose 10.0. Therefore i am using getBuiltInDocumentProperties().setCreatedTimePublic(new Date())

It seems that field CreateDate is not updated anymore.
<span style=“font-size: 11pt; font-family: “Arial”,“sans-serif”;”>{ <span style=“font-size: 11pt; font-family: “Arial”,“sans-serif”;” lang=“EN-US”>CREATEDATE @ “dd MMMM yyyy”<span style=“font-size: 11pt; font-family: “Arial”,“sans-serif”;”>}

Result after updating per Document#updateFields()
02 December 2003

I
would have expected

:
15 April 2011
(this is the result after manually update of document)

Thanks a lot.

Best
regards
Matthias

Hi

Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

As a workaround, you can use {DOCPROPERTY CreateTime \@ "dd MMMM yyyy"} instead of CREATEDATE field.

Best regards,

The issues you have found earlier (filed as WORDSNET-4639) have been fixed in this .NET update and in this Java update.


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