Link to home
Start Free TrialLog in
Avatar of sydneyguy
sydneyguyFlag for Australia

asked on

placing a vb timer onto a form in outlook 2003

easy for any msoutlook VB experts,
 I need a userform inside outlook that I will be creating in my macro area that will start at start up or when it is open that simply calls a line of VB,a timer will activate and  runs a sub routine every minuites. Have looked at the form but cannot remember how to add a timer to a form and then the code to trigger the event every 5 min aprox, outlook 2003  any direction or pointed in the right directon to some examples or any help woudl be appreciated
Avatar of David Lee
David Lee
Flag of United States of America image

Hi, sydneyguy.

I don't know of a way to add the standard VB Timer control to an Outlook form.  You can add a third-party timer control though, and that might actually be a better solution.  The VB Timer control uses miliseconds and can be set to a maximum of 65,535, or just over one minute.  There are a variety of third-party controls that offer resolutions of seconds, minutes, hours, days, etc. allowing for much better control with less programming effort.  An alternative is to not use a form and control, but instead use the Tiemr API directly.  Here's a link to a sample: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=58497&lngWId=1
Avatar of sydneyguy

ASKER

actually gave up on putting a timer on the page but instead I actually send a small file to the mail server every time it gets mail, so after it starts off its guareenteed of getting a kick in the guts every five min.
calls and recieves the code then runs the code deletes the file and then sends another. Good part about this is I can see remotly that the suystem is still going, but will eventuall have another bit of software monitoring the ticks and if this falls over it will then notify my by sms or somthing have not looked into this area yet. but thats were I will be heading, if you have any ideas on monitoring the syste  let me know, but the system will eventually be fail safe and I can actually use this to send stats up to a web sever that I can see external with out having to vnc into it....
Can you describe a bit more about what the overall goal is?  I do have a system monitoring routine, but I'm not sure if it's what you need.
Sorry for the delay, been working on a work around
overall outlook has a problem were the system only calls the code new_mail when the mail arrives, if there is no mail the code never runs,so what I have done at the completion of a timer or a code run I send the system an email to the email server back to its self, and at the next timer tick the code always runs, good to check the system is still alive,  but am looking at some other type of timer on the form its self. can you suggest a good third party timer?
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America 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
sorry about that have been still working on this problem but have had a few pressing challenges that needed to be looked at before finishing this question, but will accept the answer and re list later when I have more information on direction that I need to go