From: "Dwayne Smurdon @ DNA Media Pro" Date: 2003-02-01T17:09:19+09:00 Subject: Re: Creating a Folder in Outlook This is a multi-part message in MIME format. ------=_NextPart_000_0192_01C2C99E.ED846DD0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit B.I.N.G.O. Thanks, that's what I needed. > -----Original Message----- > From: Chad Fowler [mailto:chad@chadfowler.com] > Sent: Saturday, February 01, 2003 2:26 AM > To: ruby-talk ML > Subject: Re: Creating a Folder in Outlook > > > On Sat, 1 Feb 2003, Dwayne Smurdon @ DNA Media Pro wrote: > > > Ok, I broke down and bought "Programming Microsoft Outlook > 2000" book - but > > I still can't find the solution to this question in it. > > > > > > I am simply trying to create a folder called "test" inside > my default > > contacts folder. Of course, I want to be able to do this > in other folders > > too. Here is what I think it should be, but the compiler > doesn't like it. > > :) > > > > > > outlook = WIN32OLE.new("outlook.application") > > oNameSpace = outlook.getNameSpace('MAPI'); > > @@contactFolder = oNameSpace.GetDefaultFolder(10) > > @@contactFolder.add("test", 10) # 10 is optional > > > > > > I've only spent a few minutes on this and I haven't done much OLE > programming before, but might you want the following: > > @@contactFolder.Folders.Add("test", 10) > > This worked for me. > > Chad > > > ------=_NextPart_000_0192_01C2C99E.ED846DD0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable RE: Creating a Folder in Outlook

B.I.N.G.O.

Thanks, that's what I needed.

> -----Original Message-----
> From: Chad Fowler [mailto:chad@chadfowler.com]
> Sent: Saturday, February 01, 2003 2:26 AM
> To: ruby-talk ML
> Subject: Re: Creating a Folder in Outlook
>
>
> On Sat, 1 Feb 2003, Dwayne Smurdon @ DNA Media = Pro wrote:
>
> > Ok, I broke down and bought = "Programming Microsoft Outlook
> 2000" book - but
> > I still can't find the solution to this = question in it.
> >
> >
> > I am simply trying to create a folder = called "test" inside
> my default
> > contacts folder.  Of course, I want to = be able to do this
> in other folders
> > too.  Here is what I think it should = be, but the compiler
> doesn't like it.
> > :)
> >
> >
> >     outlook =3D = WIN32OLE.new("outlook.application")
> >     oNameSpace =3D = outlook.getNameSpace('MAPI');
> >     @@contactFolder =3D = oNameSpace.GetDefaultFolder(10)
> >     = @@contactFolder.add("test", 10) # 10 is optional
> >
> >
>
> I've only spent a few minutes on this and I = haven't done much OLE
> programming before, but might you want the = following:
>
> @@contactFolder.Folders.Add("test", = 10)
>
> This worked for me. 
>
> Chad
>
>
>

------=_NextPart_000_0192_01C2C99E.ED846DD0--