Prev: PowerPoint Placeholder - HELP!
Next: More than one or multiple notes pages (not using hide slide)
From: a1k1do via OfficeKB.com on 10 May 2010 03:58 Would it be possible to run a macro like this to insert the code in all slides. This is for modules and way above my head but i might be thinking in the right direction. Sub InsertCode(ByVal Pres As Presentation, ByVal Code As String) Dim CM As CodeModule Dim I As Long For I = 1 To Pres.VBProject.VBComponents.Count With Pres.VBProject.VBComponents(I) If .Type = vbext_ct_StdModule Then Set CM = .CodeModule End If End With Next If CM Is Nothing Then Set CM = Pres.VBProject.VBComponents.Add( _ vbext_ct_StdModule).CodeModule End If CM.AddFromString Code End Sub a1k1do wrote: >>> Hi Steve >>> >[quoted text clipped - 16 lines] >>PPTools add-ins for PowerPoint >>http://www.pptools.com/ > >Steve, thanks >I hope I can convey this in a suitable way, i know actionscript but my >understanding of VBA/Macro's is lacking. Thanks to www. pptfaq.com i am >learning. >This will be colloquial: >The flash/shockwave is embedded in a slide “ lets say slide 10”, then i >(right click) the shockwave object on slide and select “view code”. I add >the following code: >Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As >String) >With SlideShowWindows(1).View >.GotoSlide (1) >End With >End Sub >In the Object browser i can see a Micosoft Powerpoint Object but there is no >module, I have not added this as a macro. >I run in show mode press the flash object and it will take me to slide 1 in >this case. >I don't think I can trap a fscommand and invoke a macro! I maybe wrong. >I'm trying to then write some form of macro or script that would copy the >shockwave object to all other slides. I can do that no problem but the >associated script that needs to reside on each slide is sadly missing. >Kind Regards -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.aspx/powerpoint/201005/1
From: Matti Vuori on 10 May 2010 06:21 I don't know, but if you need to copy the button to all slides, then you probably should put it on the slide master. That way you need only one button and only one sub, of which you'll be very happy later when you need to make changes to the layout or the sub. "a1k1do via OfficeKB.com" <u59720(a)uwe> wrote in news:a7bc8eb951de7(a)uwe: > Hi I have a shockwave flash object embedded on a slide, it has a > simple FSCommand sub. I can use this macro to copy the afore mentioned > shockwave object to all sides but the associated FScommand sub which I > can see in the object tree on slide1, does not get transposed to the > other slides. Doers anyone know if this is beyond a macro to perform > this type of function? > > Sub flashbutton()) > > Dim oSh as Shape > Dim x as Long > > Set oSh=ActiveWindow.Selection.ShapeRange(1) > oSh.Copy > > For x = 2 to ActivePresentation.Slides.Count > ActivePresentation.Slides(x).Shapes.Paste > Next > > End Sub >
From: a1k1do via OfficeKB.com on 10 May 2010 07:08 Thanks but a flash object does not work so well on a slide master and there might be instances when i need to apply a graphic to a whole slide and then the flash object will obscure it, thanks anyway for the suggestion. Matti Vuori wrote: >I don't know, but if you need to copy the button to all slides, then you >probably should put it on the slide master. That way you need only one >button and only one sub, of which you'll be very happy later when you >need to make changes to the layout or the sub. > >> Hi I have a shockwave flash object embedded on a slide, it has a >> simple FSCommand sub. I can use this macro to copy the afore mentioned >[quoted text clipped - 16 lines] >> >> End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.aspx/powerpoint/201005/1
From: Steve Rindsberg on 10 May 2010 11:05 Thanks for hanging in there ... the shoe dropped, the light went on, the bell rang ... finally I got it. ;-) And can repro the problem here. The same thing happens with other controls (ActiveX buttons and so on). I've got to run now but will have a look at this in a bit. Back at you later ... In article <a7c8f03bec961(a)uwe>, A1k1do via OfficeKB.com wrote: > Steve Rindsberg wrote: > >> Hi Steve > >> > >[quoted text clipped - 11 lines] > >> I can do it one by one but was hoping to automate the task so I could use in > >> the future. > > > >Is this a routine that clicking a button within the flash calls in VBA or ??? > > > >> Thanks > >> > >[quoted text clipped - 15 lines] > >> >PPTools add-ins for PowerPoint > >> >http://www.pptools.com/ > > > >============================== > >PPT Frequently Asked Questions > >http://www.pptfaq.com/ > > > >PPTools add-ins for PowerPoint > >http://www.pptools.com/ > > Steve, thanks > I hope I can convey this in a suitable way, i know actionscript but my > understanding of VBA/Macro�s is lacking. Thanks to www. pptfaq.com i am > learning. > This will be colloquial: > The flash/shockwave is embedded in a slide � lets say slide 10�, then i > (right click) the shockwave object on slide and select �view code�. I add > the following code: > Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args As > String) > With SlideShowWindows(1).View > .GotoSlide (1) > End With > End Sub > In the Object browser i can see a Micosoft Powerpoint Object but there is no > module, I have not added this as a macro. > I run in show mode press the flash object and it will take me to slide 1 in > this case. > I don�t think I can trap a fscommand and invoke a macro! I maybe wrong. > I�m trying to then write some form of macro or script that would copy the > shockwave object to all other slides. I can do that no problem but the > associated script that needs to reside on each slide is sadly missing. > Kind Regards ============================== PPT Frequently Asked Questions http://www.pptfaq.com/ PPTools add-ins for PowerPoint http://www.pptools.com/
From: Chirag on 10 May 2010 12:02 Hi, I placed an FSCommand macro just like you said but clicking on the ShockwaveFlash object during the slide show does not seem to be calling the macro. So, I was not able to test the following technique: Place a class module in your presentation and name it "SFOClass". Place the following code in it: ' SFOClass code starts here Option Explicit Public WithEvents SFO As ShockwaveFlash Private Sub SFO_FSCommand(ByVal command As String, ByVal args As String) ' place your FSCommand code here End Sub ' End of SFOClass code Replace the comment in the above code with the code within your FSCommand macro. Next place a module in your presentation (and name it whatever you like). Please the following code in it: ' Start of module code Option Explicit Private SFO As SFOClass Sub OnSlideShowPageChange(ByVal Wn As SlideShowWindow) Dim Shp As Shape For Each Shp In Wn.View.Slide.Shapes If Shp.Type = msoOLEControlObject Then If Shp.OLEFormat.ProgID Like "ShockwaveFlash.ShockwaveFlash*" Then Set SFO = New SFOClass Set SFO.SFO = Shp.OLEFormat.Object End If End If Next End Sub ' Module code ends here. Now when you start your slide show, the FSCommand should run like it does for you when you click on the ShockwaveFlash object. The code looks for Shockwave Flash object on the current slide and handles its FSCommand event. You just need to replicate your Shockwave Flash object on all slides and don't need to replicate the FSCommand macro. Let me know if it works for you (as the fundamental thing itself doesn't work for me). It would be great if you can email me a working copy of your presentation for me to see where I am missing the point. My email address is officeone at officeoneonline dot com. - Chirag PowerShow - View multiple PowerPoint slide shows simultaneously http://officeone.mvps.org/powershow/powershow.html "a1k1do via OfficeKB.com" <u59720(a)uwe> wrote in message news:a7c8f03bec961(a)uwe... > Steve Rindsberg wrote: >>> Hi Steve >>> >>[quoted text clipped - 11 lines] >>> I can do it one by one but was hoping to automate the task so I could >>> use in >>> the future. >> >>Is this a routine that clicking a button within the flash calls in VBA or >>??? >> >>> Thanks >>> >>[quoted text clipped - 15 lines] >>> >PPTools add-ins for PowerPoint >>> >http://www.pptools.com/ >> >>============================== >>PPT Frequently Asked Questions >>http://www.pptfaq.com/ >> >>PPTools add-ins for PowerPoint >>http://www.pptools.com/ > > > Steve, thanks > I hope I can convey this in a suitable way, i know actionscript but my > understanding of VBA/Macro's is lacking. Thanks to www. pptfaq.com i am > learning. > This will be colloquial: > The flash/shockwave is embedded in a slide “ lets say slide 10”, then i > (right click) the shockwave object on slide and select “view code”. I add > the following code: > Private Sub ShockwaveFlash1_FSCommand(ByVal command As String, ByVal args > As > String) > With SlideShowWindows(1).View > GotoSlide (1) > End With > End Sub > In the Object browser i can see a Micosoft Powerpoint Object but there is > no > module, I have not added this as a macro. > I run in show mode press the flash object and it will take me to slide 1 > in > this case. > I don't think I can trap a fscommand and invoke a macro! I maybe wrong. > I'm trying to then write some form of macro or script that would copy the > shockwave object to all other slides. I can do that no problem but the > associated script that needs to reside on each slide is sadly missing. > Kind Regards > > -- > Message posted via http://www.officekb.com
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: PowerPoint Placeholder - HELP! Next: More than one or multiple notes pages (not using hide slide) |