![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#11
|
|||
|
|||
![]()
Hi Sue
This is what I've changed the code to, but it doesn't seem to work. I was hoping it would flag each email with a yellow flag, but when I click 'Run' it just disappears and no mails are flagged. Sub DoSearch() Dim fld As Outlook.MAPIFolder Dim itm As Object Dim strFind As String On Error Resume Next Set fld = Application.Session.Folders("BB WEBSITE FORMS") strFind = "double-sized listing?" & vbCrLf & "Yes" ' or vbLf it's line feed not a complete CRLF For Each itm In fld.Items If InStr(1, Item.Body, strFind, vbTextCompare) 0 Then itm.FlagIcon = olYellowFlagIcon itm.Save End If Next Set itm = Nothing Set fld = Nothing End Sub Do I need to specify that it's actually a sub-folder within my Inbox? Or does the macro just look at the folder name and know where in the Mailbox it's located? What happens if you have many folders with the same name but in different locations within your mailbox? Thanks Ben Sue Mosher [MVP-Outlook] wrote: Every folder has a Folders collection that represents its subfolders. Each subfolder in a Folders collection must have a unique name. Hence, you can use fld.Folders("BB Website Forms"). |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2007: How to break vertical line in reply to message? | [email protected] | Outlook - General Queries | 1 | October 5th 07 09:15 PM |
Outlook 2003... search for line break char | Ben Bradley | Outlook - General Queries | 0 | September 24th 07 04:29 PM |
Outlook 2003 - Search folders - adding criteria to an old mail search? | Dustin Emhart | Outlook - General Queries | 0 | December 20th 06 02:39 PM |
how do I break up a large attachment that I am sending in Outlook | roger | Outlook - Installation | 1 | April 19th 06 08:11 PM |
How to input line break in the body of an email defined in vb. | Xluser@work | Outlook and VBA | 1 | February 22nd 06 02:20 PM |