Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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



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




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






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






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








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
Getting non-Excel file properties Joseph[_58_] Excel Programming 1 March 2nd 06 04:59 AM
changing the properties of an excel file [email protected] Excel Programming 2 January 19th 06 10:57 AM
is it possible to print file properties in excel? Chrystalla Excel Discussion (Misc queries) 1 August 11th 05 12:22 PM
Properties transferring from excel cells to word file properties lubo Excel Programming 4 July 12th 05 11:24 AM
Tricky Question File Properties Neil Rogers Excel Programming 1 February 3rd 04 03:03 PM


All times are GMT +1. The time now is 01:07 PM.

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"