G
Guest
I came up with this function to return the full path to any particular
folder. I can't see any issues with it, however - please feel free to break
it, if it can be. (Yeah so I didn't declare the variables in the example...)
Public Function getFullFolderPath()
Set nms = Outlook.Application.GetNamespace("MAPI")
Set targetFolder = nms.PickFolder
strPath = targetFolder
While targetFolder.Parent <> "Outlook"
strPath = targetFolder.Parent & "\" & strPath
Set targetFolder = targetFolder.Parent
Wend
Set targetFolder = Nothing
Set nms = Nothing
getFullFolderPath = strPath
End Function
folder. I can't see any issues with it, however - please feel free to break
it, if it can be. (Yeah so I didn't declare the variables in the example...)
Public Function getFullFolderPath()
Set nms = Outlook.Application.GetNamespace("MAPI")
Set targetFolder = nms.PickFolder
strPath = targetFolder
While targetFolder.Parent <> "Outlook"
strPath = targetFolder.Parent & "\" & strPath
Set targetFolder = targetFolder.Parent
Wend
Set targetFolder = Nothing
Set nms = Nothing
getFullFolderPath = strPath
End Function