PC Review


Reply
Thread Tools Rate Thread

AddPolyline always gives error

 
 
Glen Millar
Guest
Posts: n/a
 
      30th Mar 2004
Chris,

I don't know, but I know what you are going through! I was chasing help on
arrays this morning. If I find anything, I'll holler. I get an error every
time I click on the help area. :P~~~~~

--
Regards,

Glen Millar
Microsoft PPT MVP
http://www.powerpointworkbench.com/
Please tell us your ppt version, and get back to us here
Posted to news://msnews.microsoft.com

"Chris Harrington" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> 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)
>
> 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
>
>



 
Reply With Quote
 
 
 
 
Chris Harrington
Guest
Posts: n/a
 
      30th Mar 2004
Hi,

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)

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


 
Reply With Quote
 
Steve Rindsberg
Guest
Posts: n/a
 
      30th Mar 2004
>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
>
>
>.
>

 
Reply With Quote
 
Chris Harrington
Guest
Posts: n/a
 
      1st Apr 2004
He Steve,

I expect that would work, but I am using VBScript. Is there any way to do
this via script?

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
> >
> >
> >.
> >



 
Reply With Quote
 
Steve Rindsberg
Guest
Posts: n/a
 
      1st Apr 2004
> 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

 
Reply With Quote
 
Chris Harrington
Guest
Posts: n/a
 
      2nd Apr 2004
Thanks Steve for the suggestion. I tried CSng and didn't have any change in
behavior.
I did as you suggested and posted to the VBScript group. Thanks again.

"Steve Rindsberg" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> > 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
>



 
Reply With Quote
 
Steve Rindsberg
Guest
Posts: n/a
 
      2nd Apr 2004
In article <OCynW#(E-Mail Removed)>, Chris Harrington wrote:
> Thanks Steve for the suggestion. I tried CSng and didn't have any change in
> behavior.
> I did as you suggested and posted to the VBScript group. Thanks again.


No problem. Would you do me a favor and post back here when you find the
answer? Notice I said "when" and not "if"? Thought I'd send you on your way
with a nice optimistic boot. <g>

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using addpolyline in powerpoint pho Microsoft Powerpoint 2 14th Nov 2007 03:52 PM
Access error 3197 and JETCOMP.exe error "Error compacting database =?Utf-8?B?Vmlja3k=?= Microsoft Access 2 21st Jul 2007 12:29 AM
Addpolyline function equiangular Microsoft Excel Programming 2 9th Feb 2007 03:06 PM
Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified) hfk0 Microsoft ASP .NET 2 27th Mar 2006 09:43 PM
3 Problems - Media Center Error, Date/Time Error, Downloading Updates Error angieangie Windows XP General 0 23rd Dec 2005 06:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:03 AM.