BuiltinDocumentProperties

J

Joop

I'm what one would call a newby and was trying to get the
Creation Date of a .html file I open in Excel.
The code below works, but it gives me the creation date of
the Excel file where the code resides.
Changing to ActiveWorkbook gives an error.

Windows("SC1A.html").Activate
Cells(6, 7).Value = ThisWorkbook.BuiltinDocumentProperties
("Creation date").Value

Has anyone an idea how to solve this?

Joop van de Sande
 
B

Bob Phillips

Joop,

Is that because the activeworkbook is not an Excel worksheet? ACtiveworkbook
works okay for an Excel workbook.
 
J

Joop

I tried following code which does return the
BuiltinDocumentProperties names.
Changing the code to show the values gives that runtime
error again.
What is wrong with this code?

Dim p, col As Integer

Windows("SC1A.html").Activate
col = 1

For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(6, col).Value = p.Name
col = col + 1
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top