Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Aug 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disable shortcut keys in PPT (PPT VBA)

    Is there any way to disable the PPT shortcut keys e.g. Alt F11 - to open VB Editor. I can hide or disable the menu items but cannot disable the shortcut keys.

    Thanks.

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable shortcut keys in PPT (PPT VBA)

    I'll expand on this a little because I work with thnguyen, and know what he is trying to achieve.

    We have a database in which Word documents and Excel spreadsheets can be stored. We don't want any of those Office documents to have any macros attached, and we want to be able to completely disable the ability for a user to get into macros once the document is stored on the database.

    We've been able to do this in Word and Excel- there are ways to disable the keystrokes which enable a macro to be edited.

    But we're not familiar with Powerpoint, and we're looking at ways we can disable keystrokes from enabling editing of macros in that application.

    Any help would be appreciated.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  4. #3
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable shortcut keys in PPT (PPT VBA)

    Instead of disabling them, would it be feasible to re-assign them to something benign like the Beep command?
    Is the main objective simply to prevent accidental use of the (function) keys or to block potential 'meddlers'? VBA projects can be password-protected - is that enough security?

  5. #4
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable shortcut keys in PPT (PPT VBA)

    Reassigning the key would help- I'm not sure even how to do this though.

    It's not enough to protect a project. It should not be possible for any user to have access to a programming environment for a document stored in the database.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  6. #5
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,892
    Thanks
    0
    Thanked 188 Times in 172 Posts

    Re: Disable shortcut keys in PPT (PPT VBA)

    Hi Geoff,
    <hr>It should not be possible for any user to have access to a programming environment for a document stored in the database.<hr>
    Laudable goal, but I don't think this can be done. Whilst you might be able to stop someone from getting into VBA from within the document itself, I can't see how you can stop them from accessing VBA from another document/application while the db one is open.

    If the problem is that the documents on the db have their own macros and you want to stop users from running them, you could hide the macros (eg by making them private or giving them dummy arguments) or by turning them into functions or by putting an "Option Private Module" declaration at the top of any code module housing subs you don't want the user to see.

    As for restricting access to the Tools|Macro menu, the following code prevents someone using Word from pressing the ALT F8 keys, to view/run the various subroutines. I suspect PwrPt would respond to something similar. If you put this in a Word document, then anyone who presses Alt+F8 or goes to Tools|Macros|Macros... gets a message box that says "Disabled", instead of getting the menu item:

    Sub ToolsMacro()
    MsgBox "Disabled"
    End Sub

    Another approach would be to add the following line of code to the start of an existing macro:
    If Environ("Username")<>Yourname Then Exit Sub
    This would stop anyone except you using it.

    Finally, you could add an 'input pasword' box to the start of a macro.
    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  7. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Disable shortcut keys in PPT (PPT VBA)

    PowerPoint's object model is, as you know, rather less fully featured than that of Word and Excel, so my first approach would be to try to control access to the VBE with a COM Add-in using menu/toolbar (CommandBarControl.Id) intercepts. If the user tried to unload the COM Add-in, I'd close the application. I wonder whether there is a "Policy" that could be toggled by the COM Add-in (writing to the Registry) that might provide more airtight control - or is that read only when PPT loads?

  8. #7
    New Lounger
    Join Date
    Aug 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable shortcut keys in PPT (PPT VBA)

    I have found in the Microsoft web site an instruction of disable predefined shortcut keys by using System Policy Editor (poledit). But this exposes only few shortcut keys of PowerPoint.

    What I need is ways to disable most of shortcut keys in PowerPoint and my aim is trying to stop user from accessing any shortcut keys when running PowerPoint.

    I have used Application.Onkey in Excel and Application.Findkey(key).Disabled in Word to control the keys' event. But not sure how to do this in PowerPoint.

    I have created an PowerPoint Add-In to hide and disable all the unwanted menu items and commandbar controls and wondering if there is any way or any API call that be able to disable those unwanted controls' shortcut keys.

    Thanks.

    Thanks.

  9. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Disable shortcut keys in PPT (PPT VBA)

    I've never done this, but I think you could start (write?) a "keystroke watcher" program that runs as a separate process and blocks keystrokes intended for the PowerPoint window that you do not want sent. However, I couldn't even start to recommend a program or code sample for this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •