You may get warning message about the Document Inspector when you want to save Excel file.
Be careful! Parts of your document may include personal information that can't be removed by the Document Inspector.
You can remove this warning by any of the following methods.
Remove Document Inspector Warning
- Go to File > Info
- and Click in "Allow this information to be saved in your file".
OR:
- Goto File in the upper left hand corner
- Options > Trust Center > Trust Center Settings > Privacy Options
- Un-check the check box that says "Remove personal information from file properties on save"
- Click OK to apply the settings.
Remove Document Inspector Warning By VBA
This example uses the BeforeSave event to set the RemovePersonalInformation property to False, which means that personal information cannot be removed and you can't get warning message.
'------------------ Copy to ThisWorkbook ------------------
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.RemovePersonalInformation = False
End Sub