Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Edit File Properties: Title, Subject, Keywords, (MetaData) w/ VBA
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Gord Dibben, post: 6408673"] 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").Value N = N + 1 ActiveSheet.PageSetup.RightHeader = N ThisWorkbook.CustomDocumentProperties("gordo").Value = N End If ActiveSheet.PrintOut End Sub Gord Dibben MS Excel MVP [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Edit File Properties: Title, Subject, Keywords, (MetaData) w/ VBA
Top