Maybe we're saying different things about the same thing. ;-) I do loop
through each shape on each slide. I need to determine if the shape has a
linked file so that I can copy it to the same directory as the presentation
and reset the link to be relative( sort of like Steve's fixlinks). Our
customers build the presentations so I have no idea ahead of time what
controls they may decide to use. I did the most obvious ones (media files)
and now I bump into these other cases now and then. WMP, Shockwave, etc.
It would be really great if there was a generic way to determine there is a
linked file and where it is (like GetSourceFullName()).
Anyhooo, I now have the Shockwave working with control specific code.
Eeewwww.
Thanks.
> Maybe we're saying different things about the same thing. ;-) I do loop
> through each shape on each slide. I need to determine if the shape has a
> linked file so that I can copy it to the same directory as the presentation
> and reset the link to be relative( sort of like Steve's fixlinks).
Y'know, a lot of these OLE thingummies don't allow that.
They may insist on a full path or nuthin'.
So given the original files and an alternate path where you want to move them,
you could do the job, but you can't necessarily set the path to nothing but the
filename like you can with movie/sound/image links.
It'll probably vary on a case by case basis.
Lucky Mike. I fear he may've been fed more than his digestive system's ready
for ... again.
Our
> customers build the presentations so I have no idea ahead of time what
> controls they may decide to use. I did the most obvious ones (media files)
[quoted text clipped - 117 lines]
> > > > > This type of logic will be a pain for the bazillion possible
> objects.
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Mike M. - 28 Jul 2005 13:57 GMT
Bit off more than he can chew? Well, more like force fed. The ShockWave
ActiveX Control does some weird things as I found out yesterday. My program
builds the presentation, resets any links, ftps all files to a different
machine. That machine has another app the moves the files to different
folders and then stops a previous pres and starts the new one. With all
this moving about it works best to make the paths relative. The ShockWave
(and WMP) control insists on full paths. However, the ShockWave control
seems to take care of itself. When I checked the object in my pres in it's
intermediate ftp folders the full path to the folder was set in the SRC
(source) field. When it was moved to it's final folder the correct path was
in the SRC field. I swear I didn't do it. WMP just keeps my .\filename.wmv
path and won't play. The ShockWave actually played. I will be doing some
more testing to see if I can figure this out. Unfortunately when I tell
PowerPoint to Stop the show (pptOldPresentation->Close();), PowerPoint
crashes and asks me if I want to send a nice error message to the folks at
home. So I have the fun task of looking into that also.
Well, seems like I am not going to get my magic elixir today. I'll have to
settle for a Mountain Dew (as any good programmer would).
See ya.
> Y'know, a lot of these OLE thingummies don't allow that.
> They may insist on a full path or nuthin'.
[quoted text clipped - 134 lines]
> PPTools: www.pptools.com
> ================================================
Mike M. - 28 Jul 2005 15:01 GMT
Well, I have a small VB test app to test with. I have a button to open a
pres and one to close it and quit ppt (2002). When I have a ShockWave
activex control pointing to a director file (.dcr) on a slide, when I call
the close method of ppt, ppt crashes. I have a one slide pres with only the
control on it. Now to figure out is it a ppt thing or Macromedia.
> Bit off more than he can chew? Well, more like force fed. The ShockWave
> ActiveX Control does some weird things as I found out yesterday. My program
[quoted text clipped - 175 lines]
> > PPTools: www.pptools.com
> > ================================================
Steve Rindsberg - 28 Jul 2005 20:39 GMT
> Well, I have a small VB test app to test with. I have a button to open a
> pres and one to close it and quit ppt (2002). When I have a ShockWave
> activex control pointing to a director file (.dcr) on a slide, when I call
> the close method of ppt, ppt crashes. I have a one slide pres with only the
> control on it. Now to figure out is it a ppt thing or Macromedia.
WAGging madly: you maybe need to stop activity taking place in the activex
control (ie, douse the director file) before quitting?
> > Bit off more than he can chew? Well, more like force fed. The ShockWave
> > ActiveX Control does some weird things as I found out yesterday. My
[quoted text clipped - 188 lines]
> > > PPTools: www.pptools.com
> > > ================================================
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Mike M. - 29 Jul 2005 16:39 GMT
That would require my application to have intimate knowledge of what is on
each slide of the presentation. Currently that application is fairly simple
in that it just gets presentations from the server and starts them playing.
I don't really think that would help because I can get PPT to crash even if
the ShockWave control does not point to a file and is not playing. Just by
inserting the control on a slide and not setting it to anything PPT crashes
when I close the pres. For now I have decided to ditch PowerPoint and
control the ShockWave files directly using the ActiveX control through my
app (c++). When I get the time I will research this more but deadlines are
looming.
Thanks.
> > Well, I have a small VB test app to test with. I have a button to open a
> > pres and one to close it and quit ppt (2002). When I have a ShockWave
[quoted text clipped - 4 lines]
> WAGging madly: you maybe need to stop activity taking place in the activex
> control (ie, douse the director file) before quitting?