?
Solved

Outlook Rule, just for 1 word in the subject not contains

Posted on 2009-03-31
10
Medium Priority
?
620 Views
Last Modified: 2012-05-06
Hello,

I want to create a rule so e-mails JUST with the word "Start" are forwarded.

So for example if I send an e-mail with the subject "Start" it works the rule
If I send an example with the e-mail subject "The Start" then it won't use the rule
0
Comment
Question by:ShockUK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 2
10 Comments
 
LVL 40

Expert Comment

by:coolsport00
ID: 24028961
I'm pretty sure this isn't possible; Outlook isn't that granular in its rules. The only thing I can suggest is to create your rule, then on the 'Exceptions', select 'specific words in the subject' and add all other "Start..." combinations that you can think of. That is a bit tedious to be sure, but I don't think there is any other way to do what you're wanting.

Regards.
~coolsport00
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 24029547
Yes we can do this, are you comfortable and permitted to use VBA?

Chris
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 24029579
Apologies I wasn't clear, yes we can detect the condition the 'rule' activity will also have to be in teh code but yes within that constraint.

Chris
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:ShockUK
ID: 24029586
Yea,
I've used VBA for Excel & Access
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 24029601
And for your info it'll look something like:

Chris
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If lcase(Item.subject) = "start" Then
        ' do something with VBA
    End If
End Sub

Open in new window

0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 24029618
WHat do you want to happen in the specific case that the subject = start>

Chris
0
 

Author Comment

by:ShockUK
ID: 24029630
Thats great, I will give it ago in the morning.

The the " 'do something with VBA" how would I make it put the e-mail into Folder "Start"
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 24029671
Do you want to cancel the send or simply make it save the sent item in the folder start?  Also can you identify the path for folder start and i'll put something together:

In outlook put the cursor on the folder start then in the VBE immediate window type:

?application.ActiveExplorer.CurrentFolder.FolderPath

And let me know the path

Chris
0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 2000 total points
ID: 24029759
Assuming you want to force the sent message save to folder then:

Chris
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If LCase(Item.subject) = "start" Then
        Set Item.SaveSentMessageFolder = olNav2Folder("\\Personal Folders\Inbox\Experts Exchange\Answers")
    End If
End Sub
Public Function olNav2Folder(foldername As String, Optional createFolders As Boolean) As Object
Dim olApp As Object
Dim olNs As Object
Dim olfldr As Object
Dim reqdFolder As Object
Dim arrFolders() As String
Dim nestCount As Integer
 
    On Error Resume Next
    foldername = Replace(Replace(foldername, "/", "\"), "\\", "")
    If Right(foldername, 1) = "\" Then foldername = Left(foldername, Len(foldername) - 1)
    arrFolders() = Split(foldername, "\")
    Set olApp = CreateObject("Outlook.Application")
    Set olNs = olApp.GetNamespace("MAPI")
    Set reqdFolder = olNs.folders.Item(arrFolders(0))
    For nestCount = 1 To UBound(arrFolders)
        If Not reqdFolder Is Nothing Then
            Set olfldr = reqdFolder.folders
            Set reqdFolder = olfldr.Item(arrFolders(nestCount))
            If reqdFolder <> olfldr.Item(arrFolders(nestCount)) Then
                If createFolders Then
                    reqdFolder.folders.Add (arrFolders(nestCount))
                    Set olfldr = reqdFolder.folders
                    Set reqdFolder = olfldr.Item(arrFolders(nestCount))
                Else
                    Set reqdFolder = Nothing
                    Exit For
                End If
            End If
        Else
        End If
    Next
    Set olNav2Folder = reqdFolder
    Set olApp = Nothing
    Set olNs = Nothing
    Set olfldr = Nothing
    Set reqdFolder = Nothing
End Function

Open in new window

0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 24029767
Modify the line:

        Set Item.SaveSentMessageFolder = olNav2Folder("\\Personal Folders\Inbox\Experts Exchange\Answers")

to replace:
\\Personal Folders\Inbox\Experts Exchange\Answers
with the string obtained from the VBE.

Chris
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question