When creating a new excel file - and saving them to a shared drive - an Azure Information Protection Classify and Protect box appears asking to label the file as either Public Information, Internal Information, Confidential Information or Personal Information.

I have a macro that creates a bunch of different files, but when they are created and saved an Azure classification doesn't get applied to them. If it was just one file then I can easily just manually add the classification no problem. However, when the macro creates a dozen or so files, then having to classify each one, one at a time, take a little more time.

Is there a way - through vba - to set the Azure classification to "Confidential Information" as the excel file is saved to the shared drive?

I tried recording myself doing it manually, but vba doesn't pick it up.

Thanks as always