Re: Defining Slide Layout in VBA using a variable
- From: "Chirag" <Chirag@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 5 Jun 2007 17:32:07 +0530
getAttribute() returns a string but the second argument to Slides.Add() is an enum or an int. You need to convert the ppLayout* constants that you get as string to their int values and pass it as second argument.
- Chirag
PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
<koldkompress@xxxxxxxxx> wrote in message news:1181038868.148517.233570@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I'm using VBA to parse an XML file into a powerpoint. I've got an
attribute on my Slide node called "layout". When I come to create a
slide I use this code:
' For each subject within the presentation
For Each SubjNode In PresNode.childNodes
' For each slide within that subject..
For Each SlideNode In SubjNode.childNodes
'Create that slide
Set PPSlide = PPPres.Slides.Add(PPPres.Slides.Count + 1,
SlideNode.getAttribute("layout"))
If you note the last line of code, it has the slides.add with the
layout attribute from the SlideNode. However, I get a "Type Mismatch"
even though a Debug.Print SlideNode.getAttribute("layout") displays
the correct layout (ppLayoutText)
Thanks
Michael
.
- Follow-Ups:
- Re: Defining Slide Layout in VBA using a variable
- From: KoldKay
- Re: Defining Slide Layout in VBA using a variable
- References:
- Defining Slide Layout in VBA using a variable
- From: koldkompress
- Defining Slide Layout in VBA using a variable
- Prev by Date: Defining Slide Layout in VBA using a variable
- Next by Date: Re: Defining Slide Layout in VBA using a variable
- Previous by thread: Defining Slide Layout in VBA using a variable
- Next by thread: Re: Defining Slide Layout in VBA using a variable
- Index(es):
Relevant Pages
|