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