send/recive button

  • Thread starter Thread starter _rg_rg_
  • Start date Start date
R

_rg_rg_

Hello,
A little bit different than the previous thread.
-
First Question
Is there a way to call from vb the send/recive click.
I'd like my macro to make outlook to act exactly
as if the user had clicked on this button.
-
Second question:
I wrote a minimal activex that just fires an event to
every time I specify, exact replic of the *missing*
timer tool in vb. Is there a way to do this less
dirty? I cannot use the OnTime function because
I want to fire more than once per second.
-
Tahnk you.
 
See http://www.slovaktech.com/code_samples.htm#SendReceive, but in secure
versions of Outlook "clicking" the Send/Receive button will fire the
security prompts.

There's a Win32 API timer function you can call that has more granularity
than one second but you'd have to set up a callback to receive the timeout.
I've done that sort of callback in VB 6 using a form to receive the callback
but I don't know if it can be done using VBA code.

You could also search for a 3rd party timer control to use that is packaged
as an ActiveX control.
 
Thank you for the response ... but
In the begining, I worked on this problem in excel and it spells exactly the
same in outlook. I've already wrote a third party but when you diffuse your
macro, you have to send an active x with the package, you must register
it to enable its capablities. You also have to create a form and doing so
you leave the basic concept of the macro.
I looked in the API functions I have here but cannot find the one you are
talking about. Could you give me its name please. I'm also a self made
man in iformation and because of that cannot figure what you mean with
a callback function
Rg
 
Obviously any ActiveX control you use that isn't part of a standard
installation would need to be distributed and registered for it to work.
Even in VB 6 code if you use the Win32 API timer function you would need a
VB form to handle a call-back from the API function. A call-back is where
you register something in your code, in this case a VB form, to respond when
a Windows function sends a message. In this case it would be the timer call
that returns a message that the time has expired. TimeSetEvent is a Win32
API function that has a resolution of milliseconds.

For more information on setting up call-backs you can Google for various
code samples that show how to do it.
 
got it partially in excel. Only four lines in a module
run fine if you do not touch anything, but does not support
to be shaked by a user action.: App STOPS immediately
I have now to define it as an object ...
Thank you
 
Back
Top