문제

I am developing a tool to make a revision documents using excel VBA , I import excel files into our tool and manipulate them and export them , and for the second revision we import the old document and manipulate them and create a new document. So i want to add some kind of identification to the documents created by our tool , so that next time the program will identify as a previous document created with this tool.

Is there is any way to add something to excel file like excel signature and read them next time with vba? I dont want to write anything inside the cells in the workbook.

Any idea?.

도움이 되었습니까?

해결책

You could change the Author of the document?

Sub ChangeAuthor()
ActiveWorkbook.BuiltinDocumentProperties("Author").Value = "ExcelProductionMacro"
End Sub

and to retrieve

Public Function GetAuthor() As String    
GetAuthor = ActiveWorkbook.BuiltinDocumentProperties("Author").Value   
End Function

In case you are interested, here is a complete list of document properties you can access.

Others may be useful, such as Last Author, Category, Comments

BuiltInDocumentProperties

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top