![outlook conditional formatting for all folders outlook conditional formatting for all folders](https://www.deepsonline.com/media/images/Colorful_Inbox.max-1000x1000.png)
- #OUTLOOK CONDITIONAL FORMATTING FOR ALL FOLDERS ARCHIVE#
- #OUTLOOK CONDITIONAL FORMATTING FOR ALL FOLDERS CODE#
The key benefits of using the AdvancedSearch method in Outlook are: start from the recent or oldest ones you need to sort the collection by using the Sort methods of the Items class: Items.Sort("")įinally, you may also find the AdvancedSearch method of the Application class helpful. MyRestrictItems(i).Move myFolder.Folders("Business")Īlso, I'd change the filter string to include entries that may contain the passed substring: filter = & Chr(34) & "urn:schemas:httpmail:subject" & Chr(34) & " LIKE '%" & wordsInSubject & " %'" Set myRestrictItems = myItems.Restrict(" = ""*Blue Recruit Req Data*""")įor i = myRestrictItems.Count To 1 Step -1 MyNamespace.GetDefaultFolder(olFolderInbox) Set myNamespace = Application.GetNamespace("MAPI")
#OUTLOOK CONDITIONAL FORMATTING FOR ALL FOLDERS CODE#
In the code posted above I've noticed the following line: Set olMail = (" = ""*Blue Recruit Req Data*""")īe aware, the Restrict methods return an instance of the Items class which contains a collection of items that correspond to your condition, not a single item as you could think.
![outlook conditional formatting for all folders outlook conditional formatting for all folders](https://cdn.extendoffice.com/images/stories/doc-outlook/copy-automatic-conditional-formatting/doc-copy-automatic-conditional-formatting-1.png)
You need to use the Restrict or Find/ FindNext methods of the Items class to get only items that correspond to your conditions. Of course, iterating over all items in a folder is not really a good and right idea. Do I need to format this line of code any differently? Set olInb = olns.GetDefaultFolder(6)
#OUTLOOK CONDITIONAL FORMATTING FOR ALL FOLDERS ARCHIVE#
I want to search for emails that are in the Outlook Archive folder, or even a subfolder of Inbox. MyAttachment.SaveAs Filename:=FacModPath & "\" & myAttachment.DisplayNameĪ separate, but related question. If InStr(myAttachment.DisplayName, ".xlsx") Then MsgBox "No new Blue Recruit data files to load."įor Each myAttachment In myItem.Attachments If sSubj = oldSubj Or dtRecvd <= olddtRecvd Then OlddtRecvd = Sheets("CC Mapping").Range("M3").Value OldSubj = Sheets("CC Mapping").Range("M2").Value Set olMail = (" = ""*Blue Recruit Req Data*""") Set olAp = GetObject(, "Outlook.application") 'Designate ECP Facilities Model file as FNAME Sheets("Combined Attrition Data").Visible = True Sheets("Historical HRT Data").Visible = False Sheets("Historical Blue Recruit Data").Visible = True Sub CheckEmail_BlueRecruit()ĭim olAp As Object, olns As Object, olInb As Objectĭim olItm As Object, olAtch As Object, olMail As Objectĭim oldSubj As String, olddtRecvd As String It is not finding emails that contain "Blue Recruit Req Data" in the subject. If the subject lines don't match & the date of the email is after the date last stored in the Excel file, then I want to save that attachment in a folder. I want to store the subject & the received date in variables and compare them to previous subject & date stored in the Excel file running the macro. When an email is found I need to verify that it has an attachment. There will be additional words in the subject line. In older versions: Look on the View menu for Customize current View (under either Current view menu or Arrange By, depending on your Outlook version.I am trying to search Outlook for the most recent email with "Blue Recruit Req Data" in the Subject line. You can also use Conditional Formatting to create rules that change the fonts (including sizes and colors) for messages meeting specific conditions. then Other Settings to change the Row fonts. In Outlook 2010: To change the font used in the message list click the View Settings button (also on the View ribbon). You can change the message list font in all versions of Outlook. Look on the View ribbon, Navigation Pane, Options to change the font used for folder names.Ĭlick the Font button to change the font or font size used for folder names: Only Outlook 2010 includes the ability to change the font used for folder names. Question: "I can make the folder icons larger with display settings but when I choose large or extra-large fonts, this has no effect on the fonts used in the folders or the email line items in my inbox."