Lotus Notes FAQ Visit Our Sponsor!

How do you change the new mail tune under NT?

You can add this to a button you can send to your users (note the hardcoded .wav file path though):

Sub Click(Source As Button)
 ' by Lance I. Zakin
  Dim session As New NotesSession
  Dim fileName As String
  Dim choice As String
  Dim verify As String
  Dim Path As String

  fileName = Dir("C:\WINNT\MEDIA\*.WAV")
  Path = "C:\WINNT\MEDIA\"

  Print fileName
  choice = Inputbox$("Click OK to install, otherwise CANCEL to select another Tune.", "Install New Mail Tune", Path & FileName)

  Do While fileName <> "" And choice = ""
    fileName = Dir()
    Print Path & fileName
    choice = Inputbox$("Click OK to install, otherwise CANCEL to select another Tune.", "Install New Mail Tune", Path & FileName)
  Loop

  Call session.SetEnvironmentVar( "NewMailTune",  choice, True)

  Msgbox "Completed!  Restart Notes to initiate " & choice & " as your New Mail Tune.", , "Install New Mail Tune"
  Print "Restart Notes to initiate " & choice & " as your New Mail Tune."
End Sub

Applies to Notes Versions: 4, 4.5, 4.6, 5
Last Modified: August 31, 1999