How to Retrieve Content Created Date in Excel VBA
Question details
The user needs a VBA macro to extract the original document 'Content Created' date instead of the file-system creation date.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Automating file metadata extraction to audit document origins and track when the Office document was actually generated.
- Observed behavior
- Using FileSystemObject.DateCreated returns the file's disk creation date (e.g., when it was copied or downloaded), failing to retrieve the original 'Content Created' metadata visible in Windows File Explorer details.
Ensure you have the Developer tab enabled in your spreadsheet application to access the VBA Editor. Keep in mind that accessing an Office document's built-in properties requires your macro to temporarily open the target workbook.
Use BuiltinDocumentProperties to Retrieve the Origin Date
Access the original document creation timestamp stored directly within the Office file's internal metadata, bypassing the inaccurate Windows file-system timestamp.
The 'Content Created' property is inherently tied to the Office document itself, not the file system. Because FileSystemObject interacts strictly with the disk, it only knows when the file was written to the current drive. To fetch the actual origin date, you must interact with the workbook's internal property collection.
Press Alt + F11 in your spreadsheet application to open the Visual Basic for Applications (VBA) window.
Right-click on your VBAProject in the Project Explorer panel, select 'Insert', and choose 'Module'.
Write a macro that opens the target workbook using Workbooks.Open("C:\path\to\your\file.xlsx"). Then, declare a variable to store the date and assign it using: myDate = ActiveWorkbook.BuiltinDocumentProperties("Creation Date").Value.
Display the retrieved date using a MsgBox or write it to a specific cell in your main workbook. Finally, use ActiveWorkbook.Close False to close the target file without saving any unintended changes.

Execute VBA Macros Seamlessly with WPS Spreadsheet
WPS Spreadsheet offers robust support for VBA macros, allowing you to read, manipulate, and extract BuiltinDocumentProperties just like Microsoft Excel. It's a lightweight, efficient environment perfect for automating document metadata tasks.
- 1. Launch WPS Spreadsheet: Open WPS Office and start a new or existing Spreadsheet document.
- 2. Access the VBA Editor: Navigate to the 'Tools' tab on the ribbon and click on 'Macro', or simply press Alt + F11 to open the WPS VBA Editor.
- 3. Run Your Metadata Macro: Insert a new module, paste your BuiltinDocumentProperties macro code, and click 'Run' to extract the original document creation dates effortlessly.

Frequently Asked Questions
Why does FileSystemObject give the wrong creation date?
FileSystemObject interacts with the Windows file system. When a file is downloaded, copied, or transferred to a new drive, Windows assigns a new 'creation date' for that specific file instance on the disk. It ignores the internal Office metadata which tracks the original authoring date.
Can I retrieve other document properties using this VBA method?
Yes. The BuiltinDocumentProperties collection contains standard metadata fields such as 'Author', 'Last Save Time', 'Title', and 'Manager'. You can extract them by changing the string name inside the BuiltinDocumentProperties parenthesis.
Do I have to open the Excel workbook to read its BuiltinDocumentProperties?
Yes, standard Excel VBA requires the workbook object to be loaded into memory to access its internal properties. If you need to read the date without fully opening the UI, you can open the workbook in the background by setting Application.ScreenUpdating = False before running the open command.




