Avatar of PLCITS
PLCITS
 asked on

Creare outlook folder in VB.NET

Im trying to create a folder in outlook but the same level as inbox, is possible?   somebody can give me some directions

here is the code implaying

        Dim myNameSpace As Microsoft.Office.Interop.Outlook.NameSpace
        Dim myFolder As Microsoft.Office.Interop.Outlook.Folder
        Dim myNewFolder As Microsoft.Office.Interop.Outlook.Folder
        Dim objApp As Microsoft.Office.Interop.Outlook.Application 'Outlook Application

        objApp = New Microsoft.Office.Interop.Outlook.Application 'Create Outlook Instance
        myNameSpace = objApp.GetNamespace("MAPI") 'Get Appropriate Outlook Namespace

        myFolder = myNameSpace.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox)
        myNewFolder = myFolder.Folders.Add("My folder")
Visual Basic.NETMicrosoft OfficeOutlook

Avatar of undefined
Last Comment
Rgonzo1971

8/22/2022 - Mon
Éric Moreau

have you tried GetRootFolder ?
ASKER CERTIFIED SOLUTION
Rgonzo1971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck