Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook, need to auto reply based on Subject. 3

Status
Not open for further replies.

LikeThisName

Vendor
May 16, 2002
288
US
reason for questioning. i live in DC and our Pro Sports teams stink so my place of work is giving away tickets all the time to the first that respond to their email.

Two questions:

1)how do i in VBA use like instead of equal

for instance i have this:
Code:
If objItem.Subject = "Ticket" Then
    For x = 0 To 9
    PlayWavFile "c:\WINDOWS\Media\siren.wav", True
    Next
    Exit Sub
End If

that only plays the siren if the subject is exactly "Ticket"

2) What is the best approach for this kind of autoreply.

my father pointed out to me instead of JUST alerting myself tickets are available I should auto reply to the sender an email body that reads "Me."

LikeThisName <- ? Sorry It's Taken =)
 
Try:
Code:
If objItem.Subject Like "*Ticket*" Then
    For x = 0 To 9
    PlayWavFile "c:\WINDOWS\Media\siren.wav", True
    Next
    Exit Sub
End If

Dan.
 
Thankyou, Dan.

any suggestions on the auto-reply? anyone?

thanks in advance







LikeThisName <- ? Sorry It's Taken =)
 
I don't really write scripts in Outlook. Have you tried setting up a rule (Tools->Rules Wizard)?

Dan.
 
I tried using Rules Wizard. I sent a message to myself with the word 'ticket' and I replied to me. But... it only has worked once, tried 10 more times. doesn't reply.

wierd.. eh? i'll post solution when i find it.

LikeThisName <- ? Sorry It's Taken =)
 
LikeThisName,
An autoreply wizard only worked once? I know the "out of office assistant" only responds once and that's by design so as to not permanently inform people you're out of the office (once is sufficient). But this just means that a single person cannot do it more than once. Most likely a different user would get a response. From the sounds of it, you've only tested it by sending yourself mail. Get someone else to send you a message and test it out.

Then again, the 'rules' and the 'out of office assistant' may not behave similarly at all.

btw: like your name!
 
krinid i gave you a star, as i didn't think of that, however, i emailed myself twice FROM different accounts to the account that i have the rule set up.

and only the first email i sent was replied to.

this is why i think i'd prefer to do it using VBA instead of rule wizard. i'd have more control.


LikeThisName <- ? Sorry It's Taken =)
 
I've never written any scripts in Outlook before. There's no 'record macro' feature so it's hard to get started!

Anyone know a way to monitor the inbox? Is there any Application.IncomingMail event or something like that?
 
Application_NewMail()

monitors from client side.

hope that helps

LikeThisName <- ? Sorry It's Taken =)
 
there is a memory link that microsoft is aware of regarding rules wizard in outlook xp (i had the link to the article but misplaced it).

so i had to check off my sportingevent tix auto-reply rules.

the memory link was causing my excel spreadsheets to hang.

i unchecked the rules and haven't had any of the peculiar office hang ups that I was.

LikeThisName <- ? Sorry It's Taken =)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top