> I expect that would work, but I am using VBScript. Is there any way to do
> this via script?
Ah, and VBScript doesn't let you declare explicit variable types.
Good question. I've never used VBScript, but what you might do is get the code
snippet working within PPT then ask about it in one of the VBScript newsgroups
on this same server.
But here's a hunch to try out first:
Instead of:
triArray(0, 0) = 25
use
triArray(0, 0) = Csng(25)
Let us know if that works, 'kay?
>
> Chris
>
> "Steve Rindsberg" <(E-Mail Removed)> wrote in message
> news:154d601c41614$29652cf0$(E-Mail Removed)...
> > >I am creating a PPT slide with script. Adding other
> > shapes works, but when
> > >I add polylines I get the following error:
> > >
> > >ERROR: -2147024809:The specified value is out of range.
> > >
> > >The code to test adding a polyline is
> > >
> > > Dim triArray(3,1)
> >
> > Substitute:
> >
> > Dim triArray(0 To 3, 0 to 1) as Single
> >
> > >
> > > triArray(0, 0) = 25
> > > triArray(0, 1) = 100
> > > triArray(1, 0) = 100
> > > triArray(1, 1) = 150
> > > triArray(2, 0) = 150
> > > triArray(2, 1) = 50
> > > triArray(3, 0) = 25
> > > triArray(3, 1) = 100
> > >
> > > .AddPolyline triArray
> > >
> > >
> > >.
> > >
>
--
Steve Rindsberg, PPT MVP
PPT FAQ:
www.pptfaq.com
PPTools:
www.pptools.com