Does anyone know: is it possible to remove Visio file metadata with some VBA? (metadata of info like file author).
Yes, "Remove Hidden Information":
https://learn.microsoft.com/en-us/office/vba/api/visio.document.removehiddeninformation
Thank you Nikolay very useful this is possible with VBA, I am thinking as a next step:
1. Remove hidden information
2. Save file
3. Check the relevant 'fields' to make sure this information is deleted (strings set to '')
Is step 3 also possible with VBA I am wondering.
Probably there is no point to check using the same API you just used to clear it.
That is, how would you know that the API that "checks" is more reliable than the API that "clears"? ;D
BTW, the "Author" field is returned by Document.Creator
If you want to be 200% sure, extract the content of the file as XML, remove the information you don't like and then pack back.
Visio is not required to do that, just a zip/unzip app.
Thank you Nikolay, related to this I understand LINQ is a very powerful way to query data from Visio files from its internal XML format.
I'm not quite sure about LINQ (do you mean, the LINQ from .NET framework, or some app?).
To verify the author is not there, notepad should be enough actually :)
Yes of course, but for some more advanced use cases VB.NET/C# LINQ can be quite powerful with XML.