VBA Express Forum  




Go Back   VBA Express Forum > VBA Code & Other Help > Other Applications Help
     Feedback     
Register FAQ Members Arcade Knowledge Base Training Articles Consulting

Reply
 
Thread Tools Display Modes
Old 09-03-2010, 12:55 AM   #1
benjilac

 
Joined: Sep 2010
Posts: 3
Kb Entries: 0
Articles: 0
how to get a PDF's "creation date" ?

Hi everyone,
I know very few things in VBA and I need to know something:

I would like to get the "creation date" of a PDF.
When you right click on a PDF file you have a window with 3 tabs: I need to get the "creation date" that is in the second tab called "PDF" (not the first one called "general").
do you know if that is possible ?
Thanks a lot for your help

Local Time: 02:58 AM
Local Date: 05-23-2013

 
Reply With Quote Top
Old 09-03-2010, 01:18 AM   #2
xld
 
xld's Avatar
Distinguished Lord of VBAX

 
Joined: Apr 2005
Posts: 23,118
Kb Entries: 3
Articles: 2
VBA:
Const BASE_DIR As String = "C:\MyDir\" MsgBox CreateObject("Scripting.FilesystemObject").GetFile( _ BASE_DIR & "MyFile.pdf").DateLastModified
VBA tags courtesy of www.thecodenet.com


____________________________________________
Nihil simul inventum est et perfectum

Abusus non tollit usum

Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber

Local Time: 08:58 AM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 09-03-2010, 02:36 AM   #3
p45cal

 
Joined: Oct 2005
Posts: 1,705
Kb Entries: 0
Articles: 0
Quote:
 
Originally Posted by: benjilac
Hi everyone,
I know very few things in VBA and I need to know something:

I would like to get the "creation date" of a PDF.
When you right click on a PDF file you have a window with 3 tabs: I need to get the "creation date" that is in the second tab called "PDF" (not the first one called "general").
do you know if that is possible ?
Thanks a lot for your help


You could also explore the likes of:
VBA:
theDate = filedatetime("c:\myDirectory\2010-08-28_093240.png")
VBA tags courtesy of www.thecodenet.com
in excel vba. Don't know if it's truly creation date, more last modified date.


p45cal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Local Time: 07:58 AM
Local Date: 05-23-2013

 
Reply With Quote Top
Old 09-03-2010, 03:08 AM   #4
benjilac

 
Joined: Sep 2010
Posts: 3
Kb Entries: 0
Articles: 0
thank you very much for your help.

But the codes you sent actually give me the last modified date (or creation date) for the windows system point of view. (corresponding to the first "general tab" you have when you right click on the PDF file to get the file properties).

In my case, I would like to get the last modified date or creation date that is in the second tab called "PDF". (this date is different from the date you can find in the "general tab")

I dont know if that's possible

Thank you very much

Local Time: 02:58 AM
Local Date: 05-23-2013

 
Reply With Quote Top
Old 09-03-2010, 03:11 AM   #5
xld
 
xld's Avatar
Distinguished Lord of VBAX

 
Joined: Apr 2005
Posts: 23,118
Kb Entries: 3
Articles: 2
Apart from being on different tabs, what is the difference in those two dates?


____________________________________________
Nihil simul inventum est et perfectum

Abusus non tollit usum

Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber

Local Time: 08:58 AM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 09-03-2010, 03:43 AM   #6
benjilac

 
Joined: Sep 2010
Posts: 3
Kb Entries: 0
Articles: 0
the date within "PDF" tab is the actual creation date from the original author. Then the date you can find in "general" tab can differ from the first one.

Exemple: you download a PDF on the internet and save it on your desktop. If you go check the file properties, in "general" tab you will today's date, and if you go on the "PDF" tab you will find the original creation date from the author.

it seems that this specific date is encrypted within the PDF as I read here (page 844):
adobe.com/devnet/acrobat/pdfs/pdf_reference_1-7.pdf

But I am not good enough to find a way to get it..

thank you so much

Local Time: 02:58 AM
Local Date: 05-23-2013

 
Reply With Quote Top
Old 09-03-2010, 03:47 AM   #7
p45cal

 
Joined: Oct 2005
Posts: 1,705
Kb Entries: 0
Articles: 0
I don't know that this is the creation date of the pdf… it seems, on exploring some of the pdf files people have sent me in the past, that it might be the creation date of the document that was used to create the pdf?
I have no idea how to extract it.


p45cal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Last edited by p45cal : 09-03-2010 at 05:24 AM.

Local Time: 07:58 AM
Local Date: 05-23-2013

 
Reply With Quote Top
Old 09-03-2010, 06:03 AM   #8
Kenneth Hobs
 
Kenneth Hobs's Avatar

 
Joined: Nov 2005
Posts: 2,849
Kb Entries: 2
Articles: 0
You will need to get Adobe Distiller or a DLL to extract it. If you find a DLL with a function to do it, post back and someone can help at that point. Those DLL's are usually not free.

Local Time: 02:58 AM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Old 04-09-2012, 08:03 AM   #9
GregB

 
Joined: Jan 2012
Posts: 10
Kb Entries: 0
Articles: 0
Benjilac,
I know it has been a while since this post. But if you are still out there, I would love to know if you found a solution to your challenge regarding the PDF creation dates. I've a couple thousand PDFs that I need to sort. Can you help?

Thanks,
GregB vbmenu_register("postmenu_223907", true);

Local Time: 02:58 AM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 12:58 AM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2012 VBA Express