How to Change Menu Items using VBA in Powerpoint

M

matthewmark

I am processing Powerpoint presentations via VB6. The presentations use a lot
of jargon. Therefore, I need to programmatically shut off the following for
all users:

Tools/Options/Hide spelling Errors

However, I can't find how to do this. Macros, for example, do not record
menu events, such as mentioned above. I
 
S

Steve Rindsberg

Matthewmark said:
I am processing Powerpoint presentations via VB6. The presentations use a lot
of jargon. Therefore, I need to programmatically shut off the following for
all users:

Tools/Options/Hide spelling Errors

However, I can't find how to do this. Macros, for example, do not record
menu events, such as mentioned above. I


Look in the registry for most of these options settings.

HKEY_CURRENT_USER\Software\Microsoft\Office\X.0\PowerPoint\Options

where X is the Office version.

97 = 9
2000 = 9 and so on
 
M

matthewmark

I went to the registry and found the item under Options:

"Do not underline errors"

When I change the setting within Powerpoint, this value, within the
registry, changes from 0 to 1 or 1 to 0. However, when I change the value in
the registry(either manually or programmatically), it does not change the
setting within Powerpoint. I set it, then open Powerpoint. I've gone back and
forth to verify what does what.

I am using Ver 11.X and am working within that version. Any ideas.
 
S

Steve Rindsberg

Matthewmark said:
I went to the registry and found the item under Options:

"Do not underline errors"

When I change the setting within Powerpoint, this value, within the
registry, changes from 0 to 1 or 1 to 0. However, when I change the value in
the registry(either manually or programmatically), it does not change the
setting within Powerpoint. I set it, then open Powerpoint. I've gone back and
forth to verify what does what.

I am using Ver 11.X and am working within that version. Any ideas.

It works here when I change it manually.

It won't work if you change it while PPT is running, though.

It works like this:

PPT starts, reads the options settings, holds them internally.

If you change an option, it writes it back out to the registry, but it never
READS that section of the registry again.

At shutdown, it writes its internally held values back to the registry (meaning
that if your code changes the reg while PPT is running, your changes will be
overwritten.
 
M

matthewmark

Thanks. After reviewing, I noticed was attempting to write a reg string
rather than a dword number. After finding an appropriate script for that it
worked perfectly!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top