Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-20-2012, 01:56 PM
slothman2000 slothman2000 is offline Macro to link to another powerpoint presentation Windows XP Macro to link to another powerpoint presentation Office 2007
Novice
Macro to link to another powerpoint presentation
 
Join Date: Jun 2012
Posts: 13
slothman2000 is on a distinguished road
Default Macro to link to another powerpoint presentation

Does anyone have a written macro that I can run in a powerpoint show to link to another show and close the show just completed?
Reply With Quote
  #2  
Old 09-21-2012, 12:34 AM
JohnWilson JohnWilson is offline Macro to link to another powerpoint presentation Windows 7 64bit Macro to link to another powerpoint presentation Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

You need to be careful as the windows may not open in the correct order but this should work and give a start.

Sub newshow()
Dim nextpres As Presentation
SlideShowWindows(1).Parent.Windows(1).WindowState = ppWindowMinimized
SlideShowWindows(1).View.Exit
Set nextpres = Presentations.Open("C:\Users\John\Desktop\bug.pptx ")
nextpres.Windows(1).WindowState = ppWindowMinimized
nextpres.SlideShowSettings.Run
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 09-21-2012, 07:44 AM
slothman2000 slothman2000 is offline Macro to link to another powerpoint presentation Windows XP Macro to link to another powerpoint presentation Office 2007
Novice
Macro to link to another powerpoint presentation
 
Join Date: Jun 2012
Posts: 13
slothman2000 is on a distinguished road
Default

tried it....couldn't get it to work....I just don't know VBA that well....no biggy, the user will just have to close the program on their own....
Reply With Quote
  #4  
Old 09-21-2012, 07:46 AM
JohnWilson JohnWilson is offline Macro to link to another powerpoint presentation Windows 7 64bit Macro to link to another powerpoint presentation Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Set nextpres = Presentations.Open("C:\Users\John\Desktop\bug.pptx ")

You did set the path to be a file on your PC?
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #5  
Old 09-21-2012, 07:47 AM
slothman2000 slothman2000 is offline Macro to link to another powerpoint presentation Windows XP Macro to link to another powerpoint presentation Office 2007
Novice
Macro to link to another powerpoint presentation
 
Join Date: Jun 2012
Posts: 13
slothman2000 is on a distinguished road
Default

actually, the files reside on a server.....I placed the target path of the server on the line you stated...
Reply With Quote
  #6  
Old 09-21-2012, 07:51 AM
JohnWilson JohnWilson is offline Macro to link to another powerpoint presentation Windows 7 64bit Macro to link to another powerpoint presentation Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Does anything happen when you click the button that runs the code?
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #7  
Old 09-21-2012, 08:06 AM
slothman2000 slothman2000 is offline Macro to link to another powerpoint presentation Windows XP Macro to link to another powerpoint presentation Office 2007
Novice
Macro to link to another powerpoint presentation
 
Join Date: Jun 2012
Posts: 13
slothman2000 is on a distinguished road
Default

nothing....I am linking from a slideshow on my computer to a slideshow on the server...The show doesn't close and the other doesn't open...
Reply With Quote
  #8  
Old 09-21-2012, 08:07 AM
slothman2000 slothman2000 is offline Macro to link to another powerpoint presentation Windows XP Macro to link to another powerpoint presentation Office 2007
Novice
Macro to link to another powerpoint presentation
 
Join Date: Jun 2012
Posts: 13
slothman2000 is on a distinguished road
Default

we are talking Office 2007 also...
Reply With Quote
  #9  
Old 09-21-2012, 08:13 AM
JohnWilson JohnWilson is offline Macro to link to another powerpoint presentation Windows 7 64bit Macro to link to another powerpoint presentation Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Should work in 2007. It sounds like whatever you are doing in not running the macro at all.

If you insert this MsgBox "OK,I'm running"

Like this:


Sub newshow()
Dim nextpres As Presentation
Msgbox "OK,I'm running"
SlideShowWindows(1).Parent.Windows(1).WindowState = ppWindowMinimized
SlideShowWindows(1).View.Exit
Set nextpres = Presentations.Open("C:\Users\John\Desktop\bug.pptx ")
nextpres.Windows(1).WindowState = ppWindowMinimized
nextpres.SlideShowSettings.Run
End Sub

If you don't see the message then the button is not running the code and you need to investigate why.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #10  
Old 09-21-2012, 08:31 AM
slothman2000 slothman2000 is offline Macro to link to another powerpoint presentation Windows XP Macro to link to another powerpoint presentation Office 2007
Novice
Macro to link to another powerpoint presentation
 
Join Date: Jun 2012
Posts: 13
slothman2000 is on a distinguished road
Default

OK....I inserted the line and the box appears...I went to the developer screen and ran it and it appears, but I get a
run time error '2147188160 (800482240)
SlideShowWindows (unknown member) : Interger out of range. 1 is not in the valid range of 1 to 0...the debugger highlights the line right under the msgbox line...
Reply With Quote
  #11  
Old 09-21-2012, 08:40 AM
JohnWilson JohnWilson is offline Macro to link to another powerpoint presentation Windows 7 64bit Macro to link to another powerpoint presentation Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

OK is this a ppsx file maybe.

The purpose of both the minimise lines is to make sure the edit window is not in front. You can probably delete at least the first one probably both. If you have a ppsx there is no edit widow of course and it will error.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #12  
Old 09-21-2012, 09:31 AM
slothman2000 slothman2000 is offline Macro to link to another powerpoint presentation Windows XP Macro to link to another powerpoint presentation Office 2007
Novice
Macro to link to another powerpoint presentation
 
Join Date: Jun 2012
Posts: 13
slothman2000 is on a distinguished road
Default

I saved it as a ppsm and tried it.....the i am running window opens but the program doesn't close or the other doesn't open....
Reply With Quote
  #13  
Old 09-21-2012, 09:43 AM
JohnWilson JohnWilson is offline Macro to link to another powerpoint presentation Windows 7 64bit Macro to link to another powerpoint presentation Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

I was suggesting it WONT work with a ppsm.

Try removing the two lines that minimise the window


Sub newshow()
Dim nextpres As Presentation
Msgbox "OK,I'm running"

SlideShowWindows(1).View.Exit
Set nextpres = Presentations.Open("your full path ")

nextpres.SlideShowSettings.Run
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #14  
Old 09-21-2012, 09:58 AM
slothman2000 slothman2000 is offline Macro to link to another powerpoint presentation Windows XP Macro to link to another powerpoint presentation Office 2007
Novice
Macro to link to another powerpoint presentation
 
Join Date: Jun 2012
Posts: 13
slothman2000 is on a distinguished road
Default

OK....I did what you said, and it works if I run a show right from the ppt....I tried saving it in ppsx and ppmx and ran it and it doesn't work...
Reply With Quote
  #15  
Old 09-21-2012, 10:01 AM
slothman2000 slothman2000 is offline Macro to link to another powerpoint presentation Windows XP Macro to link to another powerpoint presentation Office 2007
Novice
Macro to link to another powerpoint presentation
 
Join Date: Jun 2012
Posts: 13
slothman2000 is on a distinguished road
Default

so getting close...
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to link to another powerpoint presentation rotate my ENTIRE powerpoint presentation zachary PowerPoint 2 03-26-2012 06:28 AM
PowerPoint Stops Presentation JimAllen PowerPoint 0 01-30-2012 05:23 PM
Business Powerpoint Presentation Corneb PowerPoint 0 01-23-2012 01:45 AM
music loop in powerpoint presentation genoMU69 PowerPoint 1 06-15-2011 08:00 AM
Macro to link to another powerpoint presentation PowerPoint Presentation Resource lux Office 2 07-28-2005 02:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft