I'm working on the script below to add a Microsoft Azure Information Protection Label and not able to add MSIP label.
loc= "C:\Users\user88\Downloads\file.xlsx"
guid = "abc-0-123"
With objExcel
.Workbooks.Open(loc)
.Workbooks.CustomDocumentProperties.Add "MSIP_Label_" & guid & "_Enabled", False, msoPropertyTypeString, "true"
.ActiveWorkbook.SaveAs(loc), 51
.Activeworkbook.Close
End With
Error message I get on the MSIP_Label_ line: Object doesn't support this property or method: Workbook.CustomDocumentProperties.
What do I need to change?