You are here: Office-Outlook.com  / Outlook Forum

Problem making a new folder in Outlook

Home » Outlook addins and plugins development » Developer Outlook forms
Problem making a new folder in Outlook [message #470] Mon, 17 July 2006 12:11 Go to next message
Tony
Messages: 196
Registered: July 2006
Senior Member
I am trying to create a new folder in Outlook using c++/cli and with the code:

Outlook::NameSpace ^oNS = outlookApp->GetNamespace("MAPI");
Outlook::MAPIFolder ^oInbox =
oNS->GetDefaultFolder(Outlook::OlDefaultFolders::olFolderInbox);
Outlook::MAPIFolder ^oNewFolder = oInbox->Folders->Add("testfolder ");

I get the error:

Error 1 error C2660:
'Microsoft::Office::Interop::Outlook::_Folders::Add' : function does not take
1 arguments
Re: Problem making a new folder in Outlook [message #472] Wed, 19 July 2006 05:35 Go to previous messageGo to next message
Tony
Messages: 196
Registered: July 2006
Senior Member
What would be the missing argument?

"Ken Slovak - [MVP - Outlook]" wrote:

> You must either supply the missing optional value for folder type or supply
> a system missing value to that argument.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "Tony" <Tony@discussions.microsoft.com> wrote in message
> news:E7525CF6-3921-45DB-9799-90C2971F7C40@microsoft.com...
> >
> > I am trying to create a new folder in Outlook using c++/cli and with the
> > code:
> >
> > Outlook::NameSpace ^oNS = outlookApp->GetNamespace("MAPI");
> > Outlook::MAPIFolder ^oInbox =
> > oNS->GetDefaultFolder(Outlook::OlDefaultFolders::olFolderInbox);
> > Outlook::MAPIFolder ^oNewFolder = oInbox->Folders->Add("testfolder ");
> >
> > I get the error:
> >
> > Error 1 error C2660:
> > 'Microsoft::Office::Interop::Outlook::_Folders::Add' : function does not
> > take
> > 1 arguments
> >
>
>
Previous Topic:label caption and click event
Next Topic:Word features in Outlook
Goto Forum: