Avatar of Jason Watkins
Jason Watkins
Flag for United States of America asked on

Powerpoint Macro to change pointer color

Hello,

Is there a way to write a macro that would change the pointer color, in presentation mode? The idea would be to assign the macro to a hotkey and switch the pointer's colors. The process of switching the pointer color, while presenting, is tedious and distracting. I am happy to do all the work, I just have no idea where to start. Is there some example code I could look at somewhere? I am using Powerpoint 2011 on Mac OS X 10.7

Many Thanks!
Microsoft PowerPointApple OSMicrosoft Office

Avatar of undefined
Last Comment
Jason Watkins

8/22/2022 - Mon
Rartemass

Do you want to switch the colour of the mouse pointer or the colour of the highlight when you are drawing on the presentation?

I'm not sure if there is code for this but will investigate and test.

In the meantime you can try the following alternatives:

You can quickly change to the pen pointer to draw on the screen by pressing ctrl+p (command+p on Mac).
This should be a default of red. Press Esc to return to the mouse pointer. These options only work when the presentation is running.
This may bypass your issue.

You can also try enabling the option in your mouse settings to show its location when pressing the ctrl key. This will show a large circle that reduce in size to the tip of the pointer befre fading. This is on the pointer options tab in the mouse properties in Windows, I'm not sure if this is an option on the Mac though.
Rartemass

This may help with changing the mouse pointer to another icon:
http://msdn.microsoft.com/en-us/library/office/bb237557(v=office.12).aspx
John Wilson

If you mean the pen colour
You can use:
SlideShowWindows(1).View.PointerColor.RGB = RGB(0, 0, 255)

I have a PC so not sure this can be assigned to a hotkey on a Mac - It can't on a PC.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Jason Watkins

ASKER
I would like to change the color of the pen (highlight) that is used while presenting. The code:

Sub BluePen()
SlideShowWindows(1).View.PointerColor.RGB = RGB(0, 0, 255)
End Sub

Does not run and produces an error code.

Thanks for the suggestions thus far.
John Wilson

Are you trying the code in show mode? It will only run in this mode (not edit)

If so what is the error message.

In edit mode you can change the default

ActivePresentation.SlideShowSettings.PointerColor.RGB = RGB(0, 0, 255)
Jason Watkins

ASKER
I tried running it from within the VBA editor. Not sure how to attach the macro to a keyboard combo or button. The error is attached.

Many thanks!...
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
John Wilson

As I said it cannot be run in that mode there are no SlideShowWindows - Hence SlideShowWindows Unknown Member!

You must run in show mode or use the alternative code I posted.
Jason Watkins

ASKER
OK. Thanks. How would I activate the macro from the presentation session?
John Wilson

On a PC you would add a shape as a button and give it an action of run macro. On a Mac - no idea.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Jason Watkins

ASKER
I've added a button to the toolbar, but can't see how to attach a macro to it, or how to access that button from the presentation itself.
John Wilson

I meant add a shape to the slide.

Demo
Jason Watkins

ASKER
I was able to get that done, it is just the Macro that won't manipulate the pen's color. It will not even write at this point and a single mouse click just advances the slide instead of actually drawing.

Thanks for the help
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
John Wilson

Did you try the simple demo??
Jason Watkins

ASKER
Yes. Same deal. The pointer turns into a pen, but does not write. Thanks.
ASKER CERTIFIED SOLUTION
John Wilson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Jason Watkins

ASKER
No, sorry. Is this working for you on your end?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
John Wilson

It is but on a PC!
Jason Watkins

ASKER
Ok. I am trying this on a Mac (PPT 2011)
John Wilson

I'm sure I don't have to ask but you ARE holding down the mouse button when you "write"??
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Jason Watkins

ASKER
Yes. I am holding the mouse button down in an effort to write. That action advances the show to the next slide.
Jason Watkins

ASKER
Thanks for all of the help with the question