Re: Random text problem by systemtek
systemtek
Thu Jan 31 09:58:55 CST 2008
On Jan 31, 3:07=A0pm, "McKirahan" <N...@McKirahan.com> wrote:
> "systemtek" <dun...@systemtek.co.uk> wrote in message
>
> news:c31db242-e23c-4dc3-a981-9afe9d92e8b1@y5g2000hsf.googlegroups.com...
>
> > Hi All, I have written a vbs script that uses CDO to send a test mail
> > each day, is it possible to get it to insert random quotes from a
> > defined list each day randomly ? the list can either be read from
> > a .txt file or can be inserted into the code.
>
> Wiil this help? =A0Watch for word-wrap.
>
> =A0 =A0 Dim quote(2)
> =A0 =A0 =A0 =A0 quote(0) =3D "95% of this game is half mental. --Yogi Berr=
a"
> =A0 =A0 =A0 =A0 quote(1) =3D "640K ought to be enough for anybody. --Bill =
Gates"
> =A0 =A0 =A0 =A0 quote(2) =3D "A joke is a very serious thing. --Winston Ch=
urchill"
> =A0 =A0 Randomize
> =A0 =A0 WScript.Echo quote(Int((UBound(quote)+1)*Rnd))
Thats great that worked, thanks.