|
-
Apr 20th, 2003, 12:36 PM
#1
Thread Starter
Fanatic Member
adding a folder in outlook
how can i add a folder in outlook? in know that i have to do something like this:
VB Code:
Application.Namespace("Something").Folders.Add "FolderName"
but i don't know what i have to write instead of Something...
Best Regards,
seec77
If you helped me, cosinder yourself thanked.
Get each and every Garfield strip here!
Here you can get all Calvin & Hobes strips!
Damn UComics! It was probably unprofitable for them to allow us to just download Garfield and Calving & Hobes strips... so they made folder indexing unallowed on their server!!!
I am 33% addicted to Counterstrike. What about you?
I am 23% addicted to Star Wars. What about you?
I am 0% addicted to Tupac. What about you?
-
Apr 21st, 2003, 01:43 AM
#2
Here is how to create a new folder under the Inbox folder.
Code:
Private Function CreateFolder()
'oApp - only if Outlook is not running. Otherwise use 'Application'
Dim oApp = New Outlook.Application
Dim oNS As Outlook.NameSpace
Dim oInbox As Outlook.MAPIFolder
Dim oNewFolder As Outlook.MAPIFolder
'Use only one - oApp or Application. See first comment.
'Connection object.
Set oNS = oApp.GetNamespace("MAPI")
Set oNS = Application.GetNamespace("MAPI")
'Connection to Inbox folder.
Set oInbox = oNS.GetDefaultFolder(olFolderInbox)
'Create new subfolder "NewFolder"
Set oNewFolder = oInbox.Folders.Add("NewFolder", olFolderInbox)
End Function
Last edited by RobDog888; Apr 21st, 2003 at 01:53 AM.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 22nd, 2003, 03:12 PM
#3
Thread Starter
Fanatic Member
cool, how much trouble to add a folder!
thanks man!
Best Regards,
seec77
If you helped me, cosinder yourself thanked.
Get each and every Garfield strip here!
Here you can get all Calvin & Hobes strips!
Damn UComics! It was probably unprofitable for them to allow us to just download Garfield and Calving & Hobes strips... so they made folder indexing unallowed on their server!!!
I am 33% addicted to Counterstrike. What about you?
I am 23% addicted to Star Wars. What about you?
I am 0% addicted to Tupac. What about you?
-
Apr 22nd, 2003, 03:18 PM
#4
Your welcome.
Just drill down the folder path to where ever you want to create
a folder. Even if its under the Public folders.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|