ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   excel file properties question (https://www.excelbanter.com/excel-programming/400791-excel-file-properties-question.html)

Gary Keramidas

excel file properties question
 
i usually right click on an excel file in explorer and enter a revision number
on the advanced properties page. this number shows on the statistics tab under
file/properties in excel.

is it possible to extract this number with code?
is it possible to set this number with code?


--


Gary




Mike H

excel file properties question
 
Hi,

Try this

Sub revision_number()
RevNo = ThisWorkbook.BuiltinDocumentProperties("Revision Number")
MsgBox RevNo
ThisWorkbook.BuiltinDocumentProperties("Revision Number") = _
ThisWorkbook.BuiltinDocumentProperties("Revision Number") + 1
RevNo = ThisWorkbook.BuiltinDocumentProperties("Revision Number")
MsgBox RevNo
End Sub


Mike

"Gary Keramidas" wrote:

i usually right click on an excel file in explorer and enter a revision number
on the advanced properties page. this number shows on the statistics tab under
file/properties in excel.

is it possible to extract this number with code?
is it possible to set this number with code?


--


Gary





Gary Keramidas

excel file properties question
 
that should get me started, thanks mike.

--


Gary


"Mike H" wrote in message
...
Hi,

Try this

Sub revision_number()
RevNo = ThisWorkbook.BuiltinDocumentProperties("Revision Number")
MsgBox RevNo
ThisWorkbook.BuiltinDocumentProperties("Revision Number") = _
ThisWorkbook.BuiltinDocumentProperties("Revision Number") + 1
RevNo = ThisWorkbook.BuiltinDocumentProperties("Revision Number")
MsgBox RevNo
End Sub


Mike

"Gary Keramidas" wrote:

i usually right click on an excel file in explorer and enter a revision
number
on the advanced properties page. this number shows on the statistics tab
under
file/properties in excel.

is it possible to extract this number with code?
is it possible to set this number with code?


--


Gary







Frederik[_3_]

excel file properties question
 
According to the Help in Excel VBA the BuiltinDocumentProperties are
ReadOnly...
So you can't change them...


"Mike H" schreef in bericht
...
Hi,

Try this

Sub revision_number()
RevNo = ThisWorkbook.BuiltinDocumentProperties("Revision Number")
MsgBox RevNo
ThisWorkbook.BuiltinDocumentProperties("Revision Number") = _
ThisWorkbook.BuiltinDocumentProperties("Revision Number") + 1
RevNo = ThisWorkbook.BuiltinDocumentProperties("Revision Number")
MsgBox RevNo
End Sub


Mike

"Gary Keramidas" wrote:

i usually right click on an excel file in explorer and enter a revision
number
on the advanced properties page. this number shows on the statistics tab
under
file/properties in excel.

is it possible to extract this number with code?
is it possible to set this number with code?


--


Gary







Peter T

excel file properties question
 
I don't think help is right about that, for me I can Write, eg

wb.BuiltinDocumentProperties("Revision Number") = "4"

If the file is closed can use the DSOfile.dll, assuming the dll is
registered -

Dim dso As DSOFile.OleDocumentProperties
Set dso = New DSOFile.OleDocumentProperties

dso.Open sfilename:=strFullName ' , ReadOnly:=False
sValue = dso.SummaryProperties.RevisionNumber
dso.Close

..RevisionNumber is indeed ReadOnly, adding ReadOnly:=False above doesn't
help.

Regards,
Peter T

"Frederik" wrote in message
...
According to the Help in Excel VBA the BuiltinDocumentProperties are
ReadOnly...
So you can't change them...


"Mike H" schreef in bericht
...
Hi,

Try this

Sub revision_number()
RevNo = ThisWorkbook.BuiltinDocumentProperties("Revision Number")
MsgBox RevNo
ThisWorkbook.BuiltinDocumentProperties("Revision Number") = _
ThisWorkbook.BuiltinDocumentProperties("Revision Number") + 1
RevNo = ThisWorkbook.BuiltinDocumentProperties("Revision Number")
MsgBox RevNo
End Sub


Mike

"Gary Keramidas" wrote:

i usually right click on an excel file in explorer and enter a revision
number
on the advanced properties page. this number shows on the statistics

tab
under
file/properties in excel.

is it possible to extract this number with code?
is it possible to set this number with code?


--


Gary










All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com