#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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? |
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
newSlide.Delete
I tried newSlide.Delete and it is NOT work
Thanks |
#5
|
|||
|
|||
When I writeDump(NewSlide), this is what I got:
Methods SlideID([out, retval]I4)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) |
#6
|
|||
|
|||
It is it:
deleteNewSlide = newSlide.delete(); |
|
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 |
How to scroll down the slide while presentation running? | aditya_bokade | PowerPoint | 6 | 08-12-2012 12:09 AM |
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 |