PDA

View Full Version : Solved: Anyone have a "What Am I" macro?



Paul_Hossler
08-19-2007, 01:04 PM
I know this is a shot in the dark, but before I wonder down the dark alley ways of Powerpoint VBA, and try to write my own ...

I was wondering is any one had a "What Am I" macro ... which I'm thinking would be a command button or shortcut key macro that would provide context specific information about whatever the selection was.

So is a shape was selected, the macro would popup a form with information about the shape: X, Y, L, W, fill, border, name (!!!), etc.

Same for slides, placeholders, etc.

I have one for Excel but the Excel object model is a lot easier to understand

Here's hoping :beerchug:

Paul

John Wilson
08-20-2007, 12:10 AM
not exactly but close.
Should get you started.

John

TrippyTom
08-20-2007, 09:11 AM
Hey guys,

There's a great addon that I discovered here:
http://www.pptools.com/index.html

Specifically the SHAPESTYLES and STARTERSET PLUS downloads. He has created some useful stuff! One of them being a button that tells you everything about a selected object. (it's the pig icon on the StarterSet Plus download)

[EDIT] -- I paid for the full verison, so I'm not sure if the free version lets you use all of the features, but it's very cheap and I think it's worth it.

Bob Phillips
08-21-2007, 03:38 AM
I'm a cheapie! I can confirm the pig is in the StarterSet, and works the same.

Paul_Hossler
08-21-2007, 11:47 AM
TrippyTom - John --

Good starting point -- thanks

Paul

Bob Phillips
08-22-2007, 01:11 AM
John,

A question for you, seeing as you are a PPT MVP.

How do you exactly create a PPT addin to allow application events, and how do you look at code in a loaded addin?

John Wilson
08-22-2007, 01:43 AM
Most addins have passworded code. If not you can modify the registry to view them.

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\PowerPoint\Options
Create or change DWORD "DebugAddins" value = 1.
(If this means nothing to you don't go there!)

Event handling is not simple. There'a fairly simple example in the Kbase on this site. Just as an aside the example is unnecessary as you can create a simple switch in the shortcut to do the same thing! If you have a particular event in mind we can easily create a template for the add in (not free but cheap!)
john AT technologytrish.co.uk

Bob Phillips
08-22-2007, 06:07 AM
Do you have the URL for that KBase entry handy?

Thanks for the registry key, that helps.

As someone who provides tons of support for free, I am not into paying for it myself, even cheap <G>

John Wilson
08-22-2007, 07:18 AM
http://vbaexpress.com/kb/default.php?action=list&authsel=0&appsel=4

TrippyTom
08-22-2007, 08:56 AM
Hey John,
I set that registry, and opened an add-in that I wrote (no password on it) and I'm still not seeing the code. Do I have to do something special to see it?

Bob Phillips
08-22-2007, 09:31 AM
http://vbaexpress.com/kb/default.php?action=list&authsel=0&appsel=4

LOL! I assumed that you meant the MS KBase, no wonder I couldn't find it.

John Wilson
08-22-2007, 10:50 AM
If you havent got 2003 you need to change the 11 to the version number.

Here a shot of my reg

TrippyTom
08-22-2007, 11:04 AM
Oh, I think my problem was I forgot to close PPT before making the change. When I went back to the value, it was still set at "0". :)

OOPS! :whistle:
It's fixed now, thanks.

This helps a lot, because now I don't have to save a separate PPT version anymore just to see the code!

TrippyTom
08-22-2007, 01:55 PM
Hmm, now I'm confused again.

When I make changes to a form in an add-in and save changes, the change is not showing up when I reinstall the addin. How do you ensure the .ppa file has the most recent changes if you're editing the .ppa file directly?

[EDIT] -- it's not just form edits.. it's code too. So it must be opening an old version of the file somehow when I reinstall? Man this is confusing.

John Wilson
08-22-2007, 02:19 PM
Edits to addins don't "stick"!! You can just view them. It is possible to export forms , modules etc and import them into the original powerpoint but basically you need to work on the ppt file.

TrippyTom
08-22-2007, 02:25 PM
bah! :banghead:

Well that's entirely useless to me then. I might as well change the registry back to the way it was. :) Thanks anyway. Stupid Microsoft.... grrr!

John Wilson
08-23-2007, 05:00 AM
Actually it's quite useful when you have an addin "nearly" working 100%. When a bug crops up you can quickly experiment with break points and minor changes. You'll still have to go back to ppt or export / import the modules / forms though for the final update.

I think most professionals work in the ppt until its perfect.

Paul_Hossler
08-23-2007, 11:00 AM
John, even us non-professionals work in the PPT, but I'm still looking for perfection. :rotlaugh:

Paul

Bob Phillips
08-23-2007, 01:20 PM
PPT ... perfect. Isn't that an oxymoron.

John Wilson
08-25-2007, 01:58 PM
If you believe you have a foolproof system, you've failed to take into consideration the creativity of fools.