I have recently upgraded from Office 2010 to Office 2016.
This code in Excel 2016 VBA yields a partial Outlook 2010 screenshot but nothing else. How do I access Outlook 2016 from Excel 2016 VBA:
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With...
I get an error when I add this:
Set PersonalFolder = OLns.GetFolders
Set Inbox = OLns.GetDefaultFolder(olFolderInbox)
Set BillsFolder = PersonalFolder.Folders("Bills")
Set JunkFolder = PersonalFolder.Folders("Junk E-mail")
Set PersonalFolder= Inbox.Folders("Personal Folders")
is wrong. Personal Folders is where every folder is in including Inbox.
I tried:
Set PersonalFolder = OLns.GetDefaultFolder("Personal Folders")
There are two default folders then plus the syntax of the "Personal Folders"?
What I want to do is move a specified email "From" tag items to a certain folder whenever there is "New Mail" in the inbox.
Private Sub Application_NewMail()
Dim BillsEmailFrom(100), JunkEmailFrom(100), ForumsEmailFrom(100) As String
Dim numbills, numjunk, numforums As Double
Dim OLapp...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.