Checking for msoPicture fails on one computer?

  • Thread starter Thread starter Gregg
  • Start date Start date
G

Gregg

Any ideas why this code won't operate the same on one specific computer
but works on all others I've tested on. (snippet below)

If ActiveWindow.Selection.ShapeRange.Type <> msoPicture Then
Msgbox "This is not the correct type of graphic."
Exit Sub
End if

In tests, the same graphic (jpg non-linked) was used. When ran, the
code saw it as an msoPicture on all machines except for one. I'm not
sure what it sees it as on that machine because it's a remote user that
I have limited contact with.

The only difference I can see with her machine is she has NO service
packs with her PPT 2002 and everyone else has PPT 2002 SP1 or SP3.

Could that be it?
 
Gregg said:
Any ideas why this code won't operate the same on one specific computer
but works on all others I've tested on. (snippet below)

If ActiveWindow.Selection.ShapeRange.Type <> msoPicture Then
Msgbox "This is not the correct type of graphic."
Exit Sub
End if

In tests, the same graphic (jpg non-linked) was used.

Do you mean the same presentation containing the jpg or do you mean a jpg that
the user on each computer inserted into the presentation in exactly the same
way?

If the latter, I'm betting that the PPT2002 installation has its AutoCorrect
settings, Do Boneheaded Stuff setting cranked up to Stun. Check Tools,
Options, AutoCorrect, click the AutoFormat As You Type tab and REMOVE the check
next to "Automatic Layout for Inserted Objects"

If you want to check this in code,

If ActiveWindow.Selection.ShapeRange.Type = msoPlaceholder Then
Msgbox "Change the AutoCorrect settings."
Exit Sub
End if
 
Hi, Steve. Thanks for the response.

There I go assuming. I detest that feature so much I assume everyone
has it turned off by now and I never think about it anymore.

But in a test I just ran, it seems that's the culprit. Whereas the jpg
is a type 13, with the AutoCorrect feature on, it brings in the jpg as
a type 14. That's seems to be an msoPlaceholder instead of msoPicture.

I can adjust my code easily enough to allow the object to be an
msoPlaceholder as well as an msoPicture, but that opens a whole 'nuther
can of _________. You see, since that feature changes the AutoLayout
itself (#$!!%$#!), I have to add code to check for AutoLayout type and
change it back to a two column layout and then proceed to work with the
graphic.

Oh, joy, what fun!
 
Gregg said:
Hi, Steve. Thanks for the response.

There I go assuming. I detest that feature so much I assume everyone
has it turned off by now and I never think about it anymore.

You'n'me both, bro.
But in a test I just ran, it seems that's the culprit. Whereas the jpg
is a type 13, with the AutoCorrect feature on, it brings in the jpg as
a type 14. That's seems to be an msoPlaceholder instead of msoPicture.

That'd be it, then.
I can adjust my code easily enough to allow the object to be an
msoPlaceholder as well as an msoPicture, but that opens a whole 'nuther
can of _________.

Ah. You know your way around here well enough not to mention the "W" word when
Mikey's watching, eh? Good for you! ;-)
You see, since that feature changes the AutoLayout
itself (#$!!%$#!), I have to add code to check for AutoLayout type and
change it back to a two column layout and then proceed to work with the
graphic.

At least you know what's going on ... and if you're adding the shape via code,
it's easy enough to test the inserted shape's type, and deal with it.
Incidentally, if you copy/paste and then delete the original (when it's a
placeholder) that'll convert the PH to an image again.
 
Don't want to rock the boat. Then I'd have to sing...

Everybody hates me
Nobody likes me
I'm gonna eat some ______.

BTW, in testing, when I copied the graphic-made-PH object, the copy
also became a PH. In fact, 3 pastes all became PH (making a 4 content
layout). Finally, the 5th paste resorted to a picture, because PPT ran
out of placeholders, I guess. Then there's the mopping up afterwards.

Of course, I'm using 2002 and thank goodness 2003 doesn't operate this
way. It looks like this will all go away and become a moot point for me
with the new installation. And any of my users unwilling to upgrade to
2003 (it's free for them), I'll just send them a box of tough cheese in
condolence.
 
Don't want to rock the boat. Then I'd have to sing...

Everybody hates me
Nobody likes me
I'm gonna eat some ______.

Ah. You DO know our Mikey.
BTW, in testing, when I copied the graphic-made-PH object, the copy
also became a PH. In fact, 3 pastes all became PH (making a 4 content
layout). Finally, the 5th paste resorted to a picture, because PPT ran
out of placeholders, I guess. Then there's the mopping up afterwards.

Yep, four'd about max it out.
Of course, I'm using 2002 and thank goodness 2003 doesn't operate this
way. It looks like this will all go away and become a moot point for me
with the new installation. And any of my users unwilling to upgrade to
2003 (it's free for them), I'll just send them a box of tough cheese in
condolence.

<g> Lucky it's an easy sell on the upgrade.
 

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

Back
Top