This is a multi-part message in MIME format.

------extPart_000_0192_01C2C99E.ED846DD0
Content-Type: text/plain;
	charsets-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  IN32OLE.new("outlook.application")
> >     oNameSpace  utlook.getNameSpace('MAPI');
> >     @@contactFolder  NameSpace.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
> 
> 
> 

------extPart_000_0192_01C2C99E.ED846DD0
Content-Type: text/html;
	charsets-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>RE: Creating a Folder in Outlook</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>B.I.N.G.O.</FONT>
</P>

<P><FONT SIZE=2>Thanks, that's what I needed.</FONT>
</P>

<P><FONT SIZE=2>&gt; -----Original Message-----</FONT>

<BR><FONT SIZE=2>&gt; From: Chad Fowler [mailto:chad / chadfowler.com]</FONT>

<BR><FONT SIZE=2>&gt; Sent: Saturday, February 01, 2003 2:26 AM</FONT>

<BR><FONT SIZE=2>&gt; To: ruby-talk ML</FONT>

<BR><FONT SIZE=2>&gt; Subject: Re: Creating a Folder in Outlook</FONT>

<BR><FONT SIZE=2>&gt; </FONT>

<BR><FONT SIZE=2>&gt; </FONT>

<BR><FONT SIZE=2>&gt; On Sat, 1 Feb 2003, Dwayne Smurdon @ DNA Media Pro wrote:</FONT>

<BR><FONT SIZE=2>&gt; </FONT>

<BR><FONT SIZE=2>&gt; &gt; Ok, I broke down and bought &quot;Programming Microsoft Outlook </FONT>

<BR><FONT SIZE=2>&gt; 2000&quot; book - but</FONT>

<BR><FONT SIZE=2>&gt; &gt; I still can't find the solution to this question in it.</FONT>

<BR><FONT SIZE=2>&gt; &gt; </FONT>

<BR><FONT SIZE=2>&gt; &gt; </FONT>

<BR><FONT SIZE=2>&gt; &gt; I am simply trying to create a folder called &quot;test&quot; inside </FONT>

<BR><FONT SIZE=2>&gt; my default</FONT>

<BR><FONT SIZE=2>&gt; &gt; contacts folder.&nbsp; Of course, I want to be able to do this </FONT>

<BR><FONT SIZE=2>&gt; in other folders</FONT>

<BR><FONT SIZE=2>&gt; &gt; too.&nbsp; Here is what I think it should be, but the compiler </FONT>

<BR><FONT SIZE=2>&gt; doesn't like it.</FONT>

<BR><FONT SIZE=2>&gt; &gt; :)</FONT>

<BR><FONT SIZE=2>&gt; &gt; </FONT>

<BR><FONT SIZE=2>&gt; &gt; </FONT>

<BR><FONT SIZE=2>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; outlook = WIN32OLE.new(&quot;outlook.application&quot;)</FONT>

<BR><FONT SIZE=2>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; oNameSpace = outlook.getNameSpace('MAPI');</FONT>

<BR><FONT SIZE=2>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; @@contactFolder = oNameSpace.GetDefaultFolder(10)</FONT>

<BR><FONT SIZE=2>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; @@contactFolder.add(&quot;test&quot;, 10) # 10 is optional</FONT>

<BR><FONT SIZE=2>&gt; &gt; </FONT>

<BR><FONT SIZE=2>&gt; &gt; </FONT>

<BR><FONT SIZE=2>&gt; </FONT>

<BR><FONT SIZE=2>&gt; I've only spent a few minutes on this and I haven't done much OLE </FONT>

<BR><FONT SIZE=2>&gt; programming before, but might you want the following:</FONT>

<BR><FONT SIZE=2>&gt; </FONT>

<BR><FONT SIZE=2>&gt; @@contactFolder.Folders.Add(&quot;test&quot;, 10)</FONT>

<BR><FONT SIZE=2>&gt; </FONT>

<BR><FONT SIZE=2>&gt; This worked for me.&nbsp; </FONT>

<BR><FONT SIZE=2>&gt; </FONT>

<BR><FONT SIZE=2>&gt; Chad</FONT>

<BR><FONT SIZE=2>&gt; </FONT>

<BR><FONT SIZE=2>&gt; </FONT>

<BR><FONT SIZE=2>&gt; </FONT>
</P>

</BODY>
</HTML>
------extPart_000_0192_01C2C99E.ED846DD0--