Consulting

Results 1 to 4 of 4

Thread: Macro - How to press keystrokes / key combinations?

  1. #1

    Macro - How to press keystrokes / key combinations?

    Hi all

    I need a way to enable the user toggle Windows High Contrast on presentations. I was thinking that this may be possible using a macro that presses Shift + Ctrl + Print Screen (shortcut to enable high contrast).

    I can't seem to find a way of performing such a simple task in PowerPoint (I'm very new to VBA). If anybody knows a way of doing this, please let us know!

    Thanks in advance.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    What version Jamie?

    For me shift+CTRL+printscreen doesn't work.

    Application.CommandBars.ExecuteMso("ViewDisplayInPureBlackAndWhite") works as does Application.CommandBars.ExecuteMso("ViewDisplayInColor")
    using ViewDisplayInHighContrast should work but fails here.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    Quote Originally Posted by John Wilson
    What version Jamie?

    For me shift+CTRL+printscreen doesn't work.

    Application.CommandBars.ExecuteMso("ViewDisplayInPureBlackAndWhite") works as does Application.CommandBars.ExecuteMso("ViewDisplayInColor")
    using ViewDisplayInHighContrast should work but fails here.
    My apologies, the shortcut is actually Alt +Shift + Print Screen (just tried this and it works - Windows 7).

    So just to confirm, to switch to high contrast I would simply apply:
    Application.CommandBars.ExecuteMso("ViewDisplayInPureBlackAndWhite")

    and then to return to colour:
    Application.CommandBars.ExecuteMso("ViewDisplayInColor")

    as a macro onto a button?

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    No, I just checked they set the view to B&W which is not the same thing. I don't see any code way of switching the proiper high contrast (Alt Shift PrtScr) You can't send prtScr using SendKeys so that won't work either
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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