Hi
I have some excel files in a folder but they contained some hidden information like author name, last modified etc now I want to remove all this information from all the files in a folder at a time. Now i am using MSDN macro but this maro will remove one document properties at a time. Now I need macro that will remove all document properties in one shot. Cn anyone help me in this regards and any help would be highly appreciated
This is my present macro code
Thanks in advance
Regards,
Genitist
I have some excel files in a folder but they contained some hidden information like author name, last modified etc now I want to remove all this information from all the files in a folder at a time. Now i am using MSDN macro but this maro will remove one document properties at a time. Now I need macro that will remove all document properties in one shot. Cn anyone help me in this regards and any help would be highly appreciated
This is my present macro code
Rich (BB code):
Sub TestRemoveDocumentInformation()
' Set up a named range with a comment:
Dim nm As Name
Set nm = Names.Add(Name:="TestNamedRange", _
RefersToR1C1:="=Sheet1!R1C1:R7C3")
nm.Name = "NamedRange"
' To see the comment, click the Formulas tab menu and then
' click Name Manager.
nm.Comment = "Here is a comment"
' Set some document properties:
Dim props As Office.DocumentProperties
Set props = ActiveWorkbook.BuiltinDocumentProperties
props("Author").Value = "Author Name"
props("Subject").Value = "Test Document"
' Add a comment, which includes your name.
' Removing information converts author name to Author
Dim cmt As Comment
Set cmt = Range("B3").AddComment
cmt.Visible = False
cmt.Text "This is a test"
' Remove comments, defined name comments, personal information, and document properties.
ActiveWorkbook.RemoveDocumentInformation xlRDIComments
ActiveWorkbook.RemoveDocumentInformation xlRDIDefinedNameComments
ActiveWorkbook.RemoveDocumentInformation xlRDIRemovePersonalInformation
ActiveWorkbook.RemoveDocumentInformation xlRDIDocumentProperties
End Sub
Thanks in advance
Regards,
Genitist