Consulting

Results 1 to 5 of 5

Thread: Outlook Folder Path

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Apr 2019
    Posts
    3
    Location

    Outlook Folder Path

    Goo day all

    I have this problem pointing the correct outlook subfolder path, it gives me "run time error 13".

    The sub folder is "CHHIEW\Hong\Report", it's outside of inbox folder, have tried many times changing the "/" and "" but still did'nt work, anyone got any idea how to fix this?

    Thank you for your help
    Private Sub Application_Startup()
    
    
    Dim olNs As Outlook.NameSpace
    Dim Inbox  As Outlook.MAPIFolder
    Dim olFolder As Outlook.MAPIFolder
    Dim GetFolder As Outlook.MAPIFolder
    Dim objFolder As Outlook.MAPIFolder
    
    
        Set olNs = Application.GetNamespace("MAPI")
     Set Inbox = olNs.GetDefaultFolder("\\CHHIEW\Hong\Report")
      
       Set Items = Inbox.Items
        
    End Sub
    Last edited by tg23; 04-19-2019 at 06:14 PM.

Posting Permissions

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