|
-
Feb 4th, 2008, 06:20 AM
#1
Thread Starter
Lively Member
[RESOLVED] [Outlook] Deleting a folder
I want to permanently delete a folder from the "Deleted Items" folder, but the following code won't work:
VB Code:
' Delete temp folder:
Dim myOlApp09 As Outlook.Application, myNameSpace09 As Outlook.NameSpace
Dim myFolder09 As Outlook.MAPIFolder, myFolder08 As Outlook.MAPIFolder
Set myOlApp09 = Outlook.Application
Set myNameSpace09 = myOlApp09.GetNamespace("MAPI")
Set myFolder09 = myNameSpace09.GetDefaultFolder(olFolderDeletedItems)
Set myFolder08 = myFolder09.Folders("Temp M2C Folder")
myFolder08.Delete ' Delete Folder
It doesn't show an error message but the folder isn't being deleted.
I'm programming this in VB6 and its for Outlook 2003.
Can anyone help me?
Last edited by __Russell__; Mar 6th, 2008 at 11:07 AM.
-
Mar 6th, 2008, 11:09 AM
#2
Thread Starter
Lively Member
Re: [Outlook] Deleting a folder
Excuse the double post...
But I still need help with this issue and I won't get it unless this thread is on the first page.
-
Mar 10th, 2008, 03:29 PM
#3
Re: [Outlook] Deleting a folder
 Originally Posted by __Russell__
Excuse the double post...
But I still need help with this issue and I won't get it unless this thread is on the first page.
Your code is correct.
Try deleting a folder which doesn't have any space in it's name. Create a folder "Temp" and then delete it. once it is in the deleted items folder
try this piece of code...
vb Code:
Set myFolder08 = myFolder09.Folders("Temp")
I don't know if this will help but give it a try...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 11th, 2008, 05:19 AM
#4
Thread Starter
Lively Member
Re: [Outlook] Deleting a folder
Seems to simple to work, but it does. Apparently the above code doesn't like spaces in a folder's name.
Problem solved. 
Thanks for the help.
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
|