How do I send an e-mail to a custom folder in Outlook?
I want the mail to be placed in the custom folder not in the Inbox folder.
I tried this.
Dim moApp = CreateObject("Outlook.Application")
Dim emailDefaultFolder = moApp.GetNameSpace("MAPI").GetDefaultFolder(6) 'Inbox folder
Dim emailCustomFolder = emailDefaultFolder.Folders("Submission") 'Custom Folder
Dim emailNotif = moApp.CreateItem(0)
With emailNotif
.To = "myemail.mail.net"
.Subject = "This is a test only."
.ReadReceiptRequested = True
.Send()
.Move(emailCustomFolder)
End With