Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-03-2014, 08:48 AM
phamh phamh is offline Delete a slide from a presentation in PPT Windows 7 64bit Delete a slide from a presentation in PPT Office 2013
Novice
Delete a slide from a presentation in PPT
 
Join Date: Oct 2014
Posts: 13
phamh is on a distinguished road
Default Delete a slide from a presentation in PPT

Hi,
How do I delete a slide from a PPT presentation?
This is how I add slide:
tempSlide = objPresentation.Slides;
newSlide = tempSlide.Add(tempSlide.count+1,2)
slideShape = newSlide.Shapes
aTable = slideShape.AddTable()



I tried this but it is not work
objPresentation.delete.Slide;

Please advise
Thanks
Reply With Quote
  #2  
Old 11-03-2014, 10:56 AM
JohnWilson JohnWilson is offline Delete a slide from a presentation in PPT Windows 7 64bit Delete a slide from a presentation in PPT 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

newSlide.Delete?

Did your code "tempSlide = objPresentation.Slides;" actually work? It really shouldn't nor should slideShape = newSlide.Shapes (assuming they are declared as Slides and Shapes.) Also you cannot add a table without specifying number of columns and rows can you?
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 11-03-2014, 11:35 AM
phamh phamh is offline Delete a slide from a presentation in PPT Windows 7 64bit Delete a slide from a presentation in PPT Office 2013
Novice
Delete a slide from a presentation in PPT
 
Join Date: Oct 2014
Posts: 13
phamh is on a distinguished road
Default Delete Slide

Sorry, you are right. I did typed it in hurry. Here is my full codes to generate the slide and table. Since We use Coldfusion for front end. I need to code like below
<cfscript>
tempSlide = objPresentation.Slides;
newSlide = tempSlide.Add(tempSlide.Count+1, 12);
slideShape = newSlide.Shapes;
dummyTable = slideShape.AddTable(1,1,10,188,488,10);

</cfscript>
The systax is slightly different from the rest of the world.

When I writeDump(newSlide). I saw so many methods like AddRef, Release, etc. that applies to newSlide and one of them is Delete, then I code like this
newSlide.Delete to delete the newSlide, then I gave me error: simething like "The cause of this exception was that: AutomationException: 0x80020003 - Member not found"
Thank you for your time.
Pham
Reply With Quote
  #4  
Old 11-03-2014, 12:33 PM
phamh phamh is offline Delete a slide from a presentation in PPT Windows 7 64bit Delete a slide from a presentation in PPT Office 2013
Novice
Delete a slide from a presentation in PPT
 
Join Date: Oct 2014
Posts: 13
phamh is on a distinguished road
Default newSlide.Delete

I tried newSlide.Delete and it is NOT work
Thanks
Reply With Quote
  #5  
Old 11-03-2014, 12:36 PM
phamh phamh is offline Delete a slide from a presentation in PPT Windows 7 64bit Delete a slide from a presentation in PPT Office 2013
Novice
Delete a slide from a presentation in PPT
 
Join Date: Oct 2014
Posts: 13
phamh is on a distinguished road
Default

When I writeDump(NewSlide), this is what I got:
Methods
AddRef([out, retval]UI4)
ApplyThemeColorScheme([in]BSTR, [out, retval]VOID)
Delete([out, retval]VOID)
PublishSlides([in]BSTR, [in,optional]BOOL, [in,optional]BOOL, [out, retval]VOID)
Release([out, retval]UI4)
ApplyTheme([in]BSTR, [out, retval]VOID)
Cut([out, retval]VOID)
ApplyTemplate([in]BSTR, [out, retval]VOID)
GetTypeInfo([in]UINT, [in]UI4, [out]VOID, [out, retval]VOID)
GetTypeInfoCount([out]UINT, [out, retval]VOID)
MoveTo([in]INT, [out, retval]VOID)
Copy([out, retval]VOID)
QueryInterface([in]USERDEFINED, [out]VOID, [out, retval]VOID)
Export([in]BSTR, [in]BSTR, [in,optional]INT, [in,optional]INT, [out, retval]VOID)
Invoke([in]I4, [in]USERDEFINED, [in]UI4, [in]UI2, [in]USERDEFINED, [out]VARIANT, [out]USERDEFINED, [out]UINT, [out, retval]VOID)
Select([out, retval]VOID)
Duplicate([out, retval]USERDEFINED)
GetIDsOfNames([in]USERDEFINED, [in]I1, [in]UINT, [in]UI4, [out]I4, [out, retval]VOID)

Put Properties
Design([in]USERDEFINED, [out, retval]VOID)
CustomLayout([in]USERDEFINED, [out, retval]VOID)
DisplayMasterShapes([in]USERDEFINED, [out, retval]VOID)
Layout([in]USERDEFINED, [out, retval]VOID)
BackgroundStyle([in]USERDEFINED, [out, retval]VOID)
Name([in]BSTR, [out, retval]VOID)
FollowMasterBackground([in]USERDEFINED, [out, retval]VOID)
ColorScheme([in]USERDEFINED, [out, retval]VOID)

Get Properties
ThemeColorScheme([out, retval]USERDEFINED)
Design([out, retval]USERDEFINED)
NotesPage([out, retval]USERDEFINED)
SlideShowTransition([out, retval]USERDEFINED)
Scripts([out, retval]USERDEFINED)
Application([out, retval]USERDEFINED)
CustomerData([out, retval]USERDEFINED)
CustomLayout([out, retval]USERDEFINED)
Tags([out, retval]USERDEFINED)
DisplayMasterShapes([out, retval]USERDEFINED)
Master([out, retval]USERDEFINED)
Layout([out, retval]USERDEFINED)
PrintSteps([out, retval]INT)
BackgroundStyle([out, retval]USERDEFINED)
Parent([out, retval]DISPATCH)
Name([out, retval]BSTR)
Background([out, retval]USERDEFINED)
Hyperlinks([out, retval]USERDEFINED)
Comments([out, retval]USERDEFINED)
SlideIndex([out, retval]INT)
SectionNumber([out, retval]INT)
Shapes([out, retval]USERDEFINED)
TimeLine([out, retval]USERDEFINED)
FollowMasterBackground([out, retval]USERDEFINED)
ColorScheme([out, retval]USERDEFINED)
SlideNumber([out, retval]INT)
SlideID([out, retval]I4)
Reply With Quote
  #6  
Old 11-03-2014, 01:25 PM
phamh phamh is offline Delete a slide from a presentation in PPT Windows 7 64bit Delete a slide from a presentation in PPT Office 2013
Novice
Delete a slide from a presentation in PPT
 
Join Date: Oct 2014
Posts: 13
phamh is on a distinguished road
Default

It is it:
deleteNewSlide
= newSlide.delete();
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing slides into new presentation - keeping slide numbers tanira2 PowerPoint 1 07-18-2014 11:22 AM
Presentation with table of content on every slide at right side - template? j_d PowerPoint 0 10-26-2013 05:59 AM
Delete a slide from a presentation in PPT How to scroll down the slide while presentation running? aditya_bokade PowerPoint 6 08-12-2012 12:09 AM
Delete a slide from a presentation in PPT Create PPT slide presentation with Excel data. Chart is displayed off the slide. eratem PowerPoint 4 02-29-2012 09:44 AM
Need to make a rotating slide presentation squatch97402 PowerPoint 0 12-03-2010 10:26 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:07 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