MEnewb1143 Posted February 12, 2009 Report Share Posted February 12, 2009 Trying to do something like this: If search results in Outlook equal '1234' then goto "here" Or search results in Outlook equal '2345' then goto "here" Or search results in Outlook equal '3456' then goto "here" Else stop macro (This is the rest of the macro or "here) The issue is that when I search for something, I hit F4 and type in '1234' and press enter, or the macro does. Does this make sense? Any ideas? Quote Link to comment Share on other sites More sharing options...
rberq Posted February 12, 2009 Report Share Posted February 12, 2009 I believe that ME Pro (recently released) has a GOTO command. ME 3 does not. ME 3 has a Switch / Case sequence which might help you. It requires coding your GOTO logic in-line with the Case statements; but it allows multiple Case conditions for a single block of executable code, so it's similar to but slightly simpler than coding IF A OR IF B OR IF C .... logic for A/B/C END IF IF D OR IF E OR IF F .... logic for D/E/F END IF With ME Pro you could presumably combine the Case with the GOTO. Quote Link to comment Share on other sites More sharing options...
MEnewb1143 Posted February 13, 2009 Author Report Share Posted February 13, 2009 Read the screen name!! I don't program, but I understand the basic stuff. To search in Outlook I use 'F4' which brings up a search window. From there I type in what I want to search for. Forever, it's been the same thing. Recently, it's now four things I need to search for. The format is '000-0000000-0000000' All numbers, no letters. The first three are what I've searched for. When I search, it's either true or false. I don't know how I can search for multiple things. Like I search for '1234' and I either get something or I get a system beep when I don't find anything. Make more sense? Quote Link to comment Share on other sites More sharing options...
Hoggy Posted February 14, 2009 Report Share Posted February 14, 2009 Read the screen name!! I don't program, but I understand the basic stuff. To search in Outlook I use 'F4' which brings up a search window. From there I type in what I want to search for. Forever, it's been the same thing. Recently, it's now four things I need to search for. The format is '000-0000000-0000000' All numbers, no letters. The first three are what I've searched for. When I search, it's either true or false. I don't know how I can search for multiple things. Like I search for '1234' and I either get something or I get a system beep when I don't find anything. Make more sense? Hi I think rberq's reply was pretty fair. You say you aren't a programmer, that's fine, we can take that into account, but I think most of the posters here would be happy to encourage you to pick a few things up on your way. Is the problem that you need to determine what the results are to your search and react accordingly? So, if that's the case you need to pay attention to how the screen changes if results are found, do you get another window, or does the focus change? (I haven't got outlook installed on this machine) I don't think that you can detect a beep with macro express... If you can detect the difference, rberq's post will help you structure the macro so it can move on and carry out the next search. If it seems difficult, staring to automate Outlook with VBA really is something else - just keep plugging. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.