Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default BuiltinDocumentProperties

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default BuiltinDocumentProperties

Joop,

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

--

HTH

Bob Phillips

"Joop" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default BuiltinDocumentProperties

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

-----Original Message-----
Bob,

I guess that might be the problem.

I get run time error '-2147467259 (80004005)':
The method 'Value' for the object 'DocumentProperty'
failed.

-----Original Message-----
Joop,

Is that because the activeworkbook is not an Excel

worksheet? ACtiveworkbook
works okay for an Excel workbook.

--

HTH

Bob Phillips

"Joop" wrote in message
...
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



.

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax to address ThisWorkbook.BuiltinDocumentProperties via Access Automation? [email protected] Excel Discussion (Misc queries) 0 June 24th 08 01:29 AM


All times are GMT +1. The time now is 10:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"