tg23
04-19-2019, 04:34 PM
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
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