Get MAPI Folder in Outlook from Folder Path

前端 未结 3 1916
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-18 20:47

I am trying to use the function from on this page: http://www.outlookcode.com/d/code/getfolder.htm to use the folder path to navigate to a folder. (I will copy that code ont

相关标签:
3条回答
  • 2021-01-18 21:19

    Apparently also needs this line:

    strFolderPath = Replace(strFolderPath, "\", "/")
    

    But after the previous line.

    So, in context:

    strFolderPath = Replace(strFolderPath, "\\", "")
    strFolderPath = Replace(strFolderPath, "\", "/")
    
    0 讨论(0)
  • 2021-01-18 21:40

    I found the answer. Turns out it's something stupid, as per usual :)

    Set Inbox = GetFolder("\\itadmin@email.org\inbox")
    

    needs to be

    Set Inbox = GetFolder("itadmin@email.org/inbox")
    

    . This fixes the problem. I figured I would leave this here in case anyone else has this problem, the solution is simply to follow the given format...

    0 讨论(0)
  • 2021-01-18 21:42

    Just add this line...

    strFolderPath = Replace(strFolderPath, "\\", "")

    0 讨论(0)
提交回复
热议问题