Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
For example, to remove properties and personal information from Excel files, you can save the code below as a .vbs file, and to remove properties, simply drag and drop the desired Excel files onto the script file.
Option Explicit
Dim sSrc, oWB, oProp
With CreateObject("Excel.Application")
.Visible = False
.DisplayAlerts = False
For Each sSrc in WScript.Arguments
On Error Resume Next
Set oWB = .Workbooks.Open(sSrc)
On Error Goto 0
If .Workbooks.Count > 0 Then
For Each oProp In oWB.BuiltinDocumentProperties
oProp.Value = Empty
Next
.UserName = " "
oWB.Save
oWB.Close
End If
Next
.Quit
End With
CreateObject("WScript.Shell").PopUp "Completed", 1, , 64
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question