Hi,
I'm trying to determine what the user's Macro Security Level is (ie, at runtime). Note that I'm not trying to set it, and I know that can't be done through code. The code is for a PowerPoint project, and I've looked through the PowerPoint object model, but wasn't able to find any property to access the security level.
You may be thinking "Why would he need that? The user will get a Macro warning and if they accept it, then the code will run." While that is true, there's another piece to this.
Here's the specifics:
In our case, we have a PowerPoint addin (PPA) that opens an external PPT file that also has some VBA code in it. If the user's Macro Security Level is set at "medium" everything works fine (they do get a second Macro warning when the other file is accessed from within the vba code, however that's not a problem). The main problem is that if their Macro Security Level is set to "high", then things start to fail. Variables get reset, and odd things happen. We're not 100% sure of the underlying reasons it works with "medium" and not "high" (since if they accept the Macro warning, then it should work), but anyhow, that's what happens.
Thanks for any thoughts or suggestions.
Jeff
I'm trying to determine what the user's Macro Security Level is (ie, at runtime). Note that I'm not trying to set it, and I know that can't be done through code. The code is for a PowerPoint project, and I've looked through the PowerPoint object model, but wasn't able to find any property to access the security level.
You may be thinking "Why would he need that? The user will get a Macro warning and if they accept it, then the code will run." While that is true, there's another piece to this.
Here's the specifics:
In our case, we have a PowerPoint addin (PPA) that opens an external PPT file that also has some VBA code in it. If the user's Macro Security Level is set at "medium" everything works fine (they do get a second Macro warning when the other file is accessed from within the vba code, however that's not a problem). The main problem is that if their Macro Security Level is set to "high", then things start to fail. Variables get reset, and odd things happen. We're not 100% sure of the underlying reasons it works with "medium" and not "high" (since if they accept the Macro warning, then it should work), but anyhow, that's what happens.
Thanks for any thoughts or suggestions.
Jeff