Results 1 to 4 of 4

Thread: [RESOLVED] [Outlook] Deleting a folder

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    79

    Resolved [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:
    1. '   Delete temp folder:
    2. Dim myOlApp09 As Outlook.Application, myNameSpace09 As Outlook.NameSpace
    3. Dim myFolder09 As Outlook.MAPIFolder, myFolder08 As Outlook.MAPIFolder
    4.  
    5. Set myOlApp09 = Outlook.Application
    6. Set myNameSpace09 = myOlApp09.GetNamespace("MAPI")
    7. Set myFolder09 = myNameSpace09.GetDefaultFolder(olFolderDeletedItems)
    8.            
    9. Set myFolder08 = myFolder09.Folders("Temp M2C Folder")
    10. 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width