Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to edit the Title, Subject, & Custom Properties of some files.
right now *.dwg & *.xls. What's the object or API to use to access the files document properties. (You know the ones where you right click a file and go to the custom or summary tab and look at the metadata, i.e. Title, subject etc). I'd like to to be able to retrieve the data as well as write to it. Could someone help get me started in the right direction here. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
see:
http://www.cpearson.com/excel/DocProp.aspx -- Gary''s Student - gsnu200901 "Benjamin" wrote: I'd like to edit the Title, Subject, & Custom Properties of some files. right now *.dwg & *.xls. What's the object or API to use to access the files document properties. (You know the ones where you right click a file and go to the custom or summary tab and look at the metadata, i.e. Title, subject etc). I'd like to to be able to retrieve the data as well as write to it. Could someone help get me started in the right direction here. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As a starter..................but don't miss having a look at Chip's site
that gsnu200901 pointed you to. Sub documentprops() 'list of properties on a new sheet rw = 1 Worksheets.Add For Each p In ActiveWorkbook.BuiltinDocumentProperties Cells(rw, 1).Value = p.Name Cells(rw, 4).Value = "=DocProps(" & "A" & rw & ")" rw = rw + 1 Next End Sub Sub customprops() 'list of custom properties on a new sheet rw = 1 Worksheets.Add For Each p In ActiveWorkbook.CustomDocumentProperties Cells(rw, 1).Value = p.Name Cells(rw, 4).Value = p.Value rw = rw + 1 Next End Sub Sub Add_Custom_Prop() Dim dp As DocumentProperties Set dp = ThisWorkbook.CustomDocumentProperties dp.Add Name:="gordo", _ LinkToContent:=False, _ Type:=msoPropertyTypeNumber, _ Value:=0 End Sub Sub Add_One_To_Custom_Prop() 'add 1 to "gordo" value If ActiveSheet.Name = "Sheet1" Then N = ThisWorkbook.CustomDocumentProperties("gordo").Val ue N = N + 1 ActiveSheet.PageSetup.RightHeader = N ThisWorkbook.CustomDocumentProperties("gordo").Val ue = N End If ActiveSheet.PrintOut End Sub Gord Dibben MS Excel MVP On Tue, 25 Aug 2009 08:52:01 -0700, Benjamin wrote: I'd like to edit the Title, Subject, & Custom Properties of some files. right now *.dwg & *.xls. What's the object or API to use to access the files document properties. (You know the ones where you right click a file and go to the custom or summary tab and look at the metadata, i.e. Title, subject etc). I'd like to to be able to retrieve the data as well as write to it. Could someone help get me started in the right direction here. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Choosing a Subject Title, How to be Specific | Excel Programming | |||
Can I use file information (title, subject,) as fields in Excel? | Excel Discussion (Misc queries) | |||
How do I delete or edit this- file properties statistics in excel. | Excel Discussion (Misc queries) | |||
File, properties, title | Excel Programming | |||
Apologies For No Subject. Chart Title via a Macro | Excel Programming |