hourly chime

  • Thread starter Thread starter Jabberwocky
  • Start date Start date
J

Jabberwocky

I've never done vbscripts in outlook. Has anyone written a script to
produce an hourly chime? (bell or .wav)

Thanks.
 
If VBA is fine for you, here's a sample for a timer:
http://www.vboffice.net/sample.html?mnu=2&pub=6&lang=en&smp=4&cmd=showitem

And this one plays a sound asynchronously:

Private Declare Function sndPlaySound Lib "winmm.dll" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As _
Long) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
Const SND_LOOP = &H8
Const SND_NOSTOP = &H10


Public Sub PlaySoundAsync(File As String)
On Error Resume Next
sndPlaySound File, 1 Or 2
End Sub

--
Best regards
Michael Bauer - MVP Outlook

: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Wed, 22 Oct 2008 10:10:45 -0700 (PDT) schrieb Jabberwocky:
 
Thank you very much for your response.

I'm sorry, but I need some hand-holding on this. The sample timer
script (link) looks more like a countdown timer. I suppose I could
modify it to calculate the number of minutes until the next hour, and
then set the timer, but that only gives me the first chime. I don't
understand what the attached subroutine does. It plays a sound
asynchronously with respect to what?

Please forgive my noob questions.
 
If you call the timer with a value of 60,000, it fires an event once in a
minute (which has 60,000 milliseconds). If you need an event once every
hour, call it with 360,000 (ms).

playing the sound async means, the code execution continues right after
starting the sound. If you call a sound synchronous instead, the code
execution won't continue before the sound has been completely plaid.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Tue, 28 Oct 2008 08:48:17 -0700 (PDT) schrieb Jabberwocky:
 
Back
Top