Link to home
Start Free TrialLog in
Avatar of ShockUK
ShockUK

asked on

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

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
Avatar of coolsport00
coolsport00
Flag of United States of America image

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
Avatar of Chris Bottomley
Yes we can do this, are you comfortable and permitted to use VBA?

Chris
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
Avatar of ShockUK
ShockUK

ASKER

Yea,
I've used VBA for Excel & Access
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

WHat do you want to happen in the specific case that the subject = start>

Chris
Avatar of ShockUK

ASKER

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"
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
ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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