N
nethack.addict
This is a question for the powerpoint VBA gurus among you:
I have a presentation that I only want viewable by certain
usernames--specifically, users whose Environ("username") matches a list
that I specify.
For example, suppose that I decide only the username "john" is allowed
to view my presentation. Then the ideal sequence of events would be:
- User opens presentation
- VBA checks to see if Environ("username") = "john"
- If yes, the user is allowed to view the presentation; if no, they are
given some kind of warning and/or the presentation closes.
This solution does not need to be uncrackable, just inconvenient for
any unauthorized users that "john" might forward this presentation to.
Things I've tried so far:
- Covering the content of each slide of the presentation with a
rectangle named "blocker", asking the user to click a commandbutton on
the first page, which triggers code that deletes the "blocker" shapes
only if Environ("username") = "john"
+ problem: doesn't work if I save the file as read-only
+ problem: clicking on commandbutton on first slide seems to hang
the presentation
- Trapping the event corresponding to the opening of the presentation,
doing the username check then, and closing the file if the user isn't
on the authorized list
+ Problem: there's no built-in "auto_open" event in powerpoint. You
can work around this using an add-in, but I don't want the user to have
to install an add-in to view this presentation.
The good news is that Environ("username") returns the right data. So I
just need to figure out how to limit access to the presentation based
on this data ... would be most grateful for any expert advice!
I have a presentation that I only want viewable by certain
usernames--specifically, users whose Environ("username") matches a list
that I specify.
For example, suppose that I decide only the username "john" is allowed
to view my presentation. Then the ideal sequence of events would be:
- User opens presentation
- VBA checks to see if Environ("username") = "john"
- If yes, the user is allowed to view the presentation; if no, they are
given some kind of warning and/or the presentation closes.
This solution does not need to be uncrackable, just inconvenient for
any unauthorized users that "john" might forward this presentation to.
Things I've tried so far:
- Covering the content of each slide of the presentation with a
rectangle named "blocker", asking the user to click a commandbutton on
the first page, which triggers code that deletes the "blocker" shapes
only if Environ("username") = "john"
+ problem: doesn't work if I save the file as read-only
+ problem: clicking on commandbutton on first slide seems to hang
the presentation
- Trapping the event corresponding to the opening of the presentation,
doing the username check then, and closing the file if the user isn't
on the authorized list
+ Problem: there's no built-in "auto_open" event in powerpoint. You
can work around this using an add-in, but I don't want the user to have
to install an add-in to view this presentation.
The good news is that Environ("username") returns the right data. So I
just need to figure out how to limit access to the presentation based
on this data ... would be most grateful for any expert advice!