How to extract embedded date text

Hi,


I would like to extract the rendered text for date fields with the value that is stored in the file from the last time the field was updated and not the current date as it is returning now.

I know the data is there because when I convert the file to a PDF, the date comes out the way I expect with its last value.

Regards
Nick

Hi Nick,

I have tried to understand the requirements shared by you and have not been able to understand them completely. Can you please share the snapshot image of what you are trying to render along with source presentation and desired PDF. I will investigate the possibility on my end to help you further.

Many Thanks,

Hi,


Sorry for the confusion. I think I’m partly at fault for mixing up how Words and Slides store and return data.

In Words when you encounter a field code that represents a date or page number, etc. you are able to get the embedded value which was saved the last time the field was updated. I’m aware that Power Point may not store these values like Word does, but if it does I would like to get those values as seen the last time the document was opened in office. If it doesn’t then is there a way I can programmatically replace the date so that when we convert to PDF it doesn’t use the current time?

The reason for this is that we are converting to PDF, but the dates always come out as the time we did the conversion and not the value of last printed. I have tried using the presentation.setCurrentDateTime(xxx), but it doesn’t seem to make any difference. Is that the way I should be doing this.

Regards
Nick

Hi Nick,

I have observed your comments and like to share that in your case you can set the custom date to TextFrame as text on your end. This way, the date time will remain preserved on your end and will be printed as per your needs. If there is still an issue then please share in the form of sample presentation and snapshot that what you are achieving and what is desired.

Many Thanks,

Hi,


Thank you, thats exactly what I’m after.

Could you provide a code example? I’m not quite sure how I would go about changing the date to a TextFrame.

Regards
Nick

Hi Nick,


I have shared a piece of code. I hope you will find it helpful. Please share feedback with us if there is still an issue. Please see attachments.

Best Regards,