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.O utlook.Nam eSpace
Dim myFolder As Microsoft.Office.Interop.O utlook.Fol der
Dim myNewFolder As Microsoft.Office.Interop.O utlook.Fol der
Dim objApp As Microsoft.Office.Interop.O utlook.App lication 'Outlook Application
objApp = New Microsoft.Office.Interop.O utlook.App lication 'Create Outlook Instance
myNameSpace = objApp.GetNamespace("MAPI" ) 'Get Appropriate Outlook Namespace
myFolder = myNameSpace.GetDefaultFold er(Microso ft.Office. Interop.Ou tlook.OlDe faultFolde rs.olFolde rInbox)
myNewFolder = myFolder.Folders.Add("My folder")
here is the code implaying
Dim myNameSpace As Microsoft.Office.Interop.O
Dim myFolder As Microsoft.Office.Interop.O
Dim myNewFolder As Microsoft.Office.Interop.O
Dim objApp As Microsoft.Office.Interop.O
objApp = New Microsoft.Office.Interop.O
myNameSpace = objApp.GetNamespace("MAPI"
myFolder = myNameSpace.GetDefaultFold
myNewFolder = myFolder.Folders.Add("My folder")
have you tried GetRootFolder ?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.