mvdbiest
02-23-2012, 09:43 AM
Hello
I have created a macro asking the user to select a folder, and then run another macro;
Public Sub MyMacro()
Dim mytoplvl As Folders
Set mytoplvl = Outlook.GetNamespace("MAPI").PickFolder.Folders
FolderPurge mytoplvl
End Sub
Public Sub FolderPurge(mytoplvl As Folders)
...
...
...
However, I would like to have the possibility to run this macro for certain folders, e.g. "Mailbox - Our Group Mailbox\Subfolder 1" but I cannot get this working. I have already tried several things, tried to google it, but I could not get my macro working.
Could anyone please give me a hint on how I can do this?
Any help will be appreciated
Thanks!
Michiel
I have created a macro asking the user to select a folder, and then run another macro;
Public Sub MyMacro()
Dim mytoplvl As Folders
Set mytoplvl = Outlook.GetNamespace("MAPI").PickFolder.Folders
FolderPurge mytoplvl
End Sub
Public Sub FolderPurge(mytoplvl As Folders)
...
...
...
However, I would like to have the possibility to run this macro for certain folders, e.g. "Mailbox - Our Group Mailbox\Subfolder 1" but I cannot get this working. I have already tried several things, tried to google it, but I could not get my macro working.
Could anyone please give me a hint on how I can do this?
Any help will be appreciated
Thanks!
Michiel