Create a macro in ppt 97 to open a new presentation

C

Co

Hi All,

I need to make a macro in powerpoint that opens a new presentation,
chooses a blanco slide and then clicks
cancel. However when there is no presentation opened I can't use the
macro recorder.

Marco
 
D

David M. Marcovitz

I'm not quite sure what you are trying to do, but why can't you record a
macro with the a presentation open? I get something like this doing wheat
I think you might have in mind (I'm using PPT 2003 so it might not be
exactly the same):

Sub Macro1()
Presentations.Add WithWindow:=msoTrue
ActiveWindow.View.GotoSlide Index:=ActivePresentation.Slides.Add
(Index:=1, Layout:=ppLayoutTitle).SlideIndex
ActiveWindow.Selection.SlideRange.Layout = ppLayoutBlank
End Sub

Watch out for linebreaks introduced by the news system.

--David
--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
C

Co

I'm not quite sure what you are trying to do, but why can't you record a
macro with the a presentation open? I get something like this doing wheat
I think you might have in mind (I'm using PPT 2003 so it might not be
exactly the same):

Sub Macro1()
Presentations.Add WithWindow:=msoTrue
ActiveWindow.View.GotoSlide Index:=ActivePresentation.Slides.Add
(Index:=1, Layout:=ppLayoutTitle).SlideIndex
ActiveWindow.Selection.SlideRange.Layout = ppLayoutBlank
End Sub

Watch out for linebreaks introduced by the news system.

--David
--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_http://www.PowerfulPowerPoint.com/

@p47g2000hsd.googlegroups.com:






- Tekst uit oorspronkelijk bericht weergeven -

That's the whole point. I want to do this with no presentation opened,
just the ppt window.
I have the code under a floating button ad I want it to open a new
presentation.

Marco
 
D

David M. Marcovitz

That's the whole point. I want to do this with no presentation opened,
just the ppt window.
I have the code under a floating button ad I want it to open a new
presentation.

Marco

Yes, but recording with a presentation open will help you get the code
you need. Then, if you want to run it without any presentation open, you
will need to incoroporate it into an add-in. See some information about
creating an addin here:

Create an ADD-IN with TOOLBARS that run macros
http://www.pptfaq.com/FAQ00031.htm

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 

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

Top