Hello!
I am using this code to pick up the body of emails in outlook:
Dim OutApp As Object
Dim NmSpace As Object
Dim Inbox As Object
Dim MItem As Object
Dim i As Long
Dim x As Integer
Dim Feedb As String
Set OutApp = CreateObject("Outlook.Application")
Set NmSpace = OutApp.GetNamespace("MAPI")
Set Inbox = NmSpace.GetDefaultFolder(6)
i = 1
On Error Resume Next
For Each MItem In Inbox.Items
DoEvents
If MItem.Subject = "Seminar" Then
MItem.Flagstatus = olFlagMarked
End If
Next
End Sub
My problem is I have 2 inboxes in outlook, a default and a different one. How can I find out what code should replace Set Inbox = NmSpace.GetDefaultFolder(6) to pick up emails from the other inbox?
Thank you!
I am using this code to pick up the body of emails in outlook:
Dim OutApp As Object
Dim NmSpace As Object
Dim Inbox As Object
Dim MItem As Object
Dim i As Long
Dim x As Integer
Dim Feedb As String
Set OutApp = CreateObject("Outlook.Application")
Set NmSpace = OutApp.GetNamespace("MAPI")
Set Inbox = NmSpace.GetDefaultFolder(6)
i = 1
On Error Resume Next
For Each MItem In Inbox.Items
DoEvents
If MItem.Subject = "Seminar" Then
MItem.Flagstatus = olFlagMarked
End If
Next
End Sub
My problem is I have 2 inboxes in outlook, a default and a different one. How can I find out what code should replace Set Inbox = NmSpace.GetDefaultFolder(6) to pick up emails from the other inbox?
Thank you!