Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-03-31
10
Medium Priority
?
622 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
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.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

609 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