A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

New message in Public Folder



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 12th 06, 02:40 PM posted to microsoft.public.outlook.program_vba
Leech
external usenet poster
 
Posts: 3
Default New message in Public Folder

Hi there!

there is special alert when new message arrives to Personal Inbox folder.
different actions can be obtained thru Rules Wizard but it doesnt work with
messages arrived to Public Folder(s). what is the easiest way to solve the
problem? need a little .wav file to be played. thanks!
Ads
  #2  
Old January 12th 06, 04:14 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default New message in Public Folder

Handle the ItemAdd event for the Items collection for whatever public folder
you want, then call the Win32 API sound routines to play the sound.

Here's what the Win32 API calls would look like:

Public Declare Function sndPlaySound Lib "WINMM.DLL" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As _
Long) As Long

Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1
Public Const SND_NODEFAULT = &H2
Public Const SND_LOOP = &H8
Public Const SND_NOSTOP = &H10

Public Sub PlaySound(SoundName As String) 'must be .WAV file
Dim wFlags As Integer
Dim X As Integer

On Error Resume Next

If SoundName "" Then
wFlags = SND_ASYNC Or SND_NODEFAULT
X = sndPlaySound(SoundName, wFlags)
End If
End Sub


--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Leech" wrote in message
...
Hi there!

there is special alert when new message arrives to Personal Inbox folder.
different actions can be obtained thru Rules Wizard but it doesnt work
with
messages arrived to Public Folder(s). what is the easiest way to solve the
problem? need a little .wav file to be played. thanks!


  #3  
Old January 12th 06, 05:11 PM posted to microsoft.public.outlook.program_vba
Leech
external usenet poster
 
Posts: 3
Default New message in Public Folder

Thank You, Ken.

I'm a beginner at VB therefore kindly ask You to help me with the first part
of the problem also. Any helpful internet link is appreciated (I'm still
looking for the code examples).
thanks in advance,

best regards

"Ken Slovak - [MVP - Outlook]" wrote:

Handle the ItemAdd event for the Items collection for whatever public folder
you want, then call the Win32 API sound routines to play the sound.

Here's what the Win32 API calls would look like:

Public Declare Function sndPlaySound Lib "WINMM.DLL" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As _
Long) As Long

Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1
Public Const SND_NODEFAULT = &H2
Public Const SND_LOOP = &H8
Public Const SND_NOSTOP = &H10

Public Sub PlaySound(SoundName As String) 'must be .WAV file
Dim wFlags As Integer
Dim X As Integer

On Error Resume Next

If SoundName "" Then
wFlags = SND_ASYNC Or SND_NODEFAULT
X = sndPlaySound(SoundName, wFlags)
End If
End Sub


--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Leech" wrote in message
...
Hi there!

there is special alert when new message arrives to Personal Inbox folder.
different actions can be obtained thru Rules Wizard but it doesnt work
with
messages arrived to Public Folder(s). what is the easiest way to solve the
problem? need a little .wav file to be played. thanks!



  #4  
Old January 16th 06, 05:36 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default New message in Public Folder

Take a look at the code sample http://www.outlookcode.com/d/code/zaphtml.htm
that shows how to use ItemAdd for the Items collection of the Inbox. You
would use code similar to that for the public folder.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Leech" wrote in message
...
Thank You, Ken.

I'm a beginner at VB therefore kindly ask You to help me with the first
part
of the problem also. Any helpful internet link is appreciated (I'm still
looking for the code examples).
thanks in advance,

best regards


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Public Folder forms hjoseph Outlook - Using Forms 1 February 27th 06 09:04 PM
Public Folder Issue Maurice Outlook - Calandaring 3 February 22nd 06 12:15 AM
Public folder reminders Aaron Neunz Outlook - General Queries 3 January 24th 06 02:10 AM
Number of messages in Public Folder John Cranston Outlook - General Queries 2 January 20th 06 07:22 PM
Message goes to Deleted Items folder instead of Inbox folder needhelp Outlook Express 3 January 17th 06 05:49 PM


All times are GMT +1. The time now is 08:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.