?
Solved

E-mail notification of new task entry in public folders

Posted on 2008-10-17
6
Medium Priority
?
452 Views
Last Modified: 2009-02-01
We are using a task folder located in Public Folders. Four people have access to enter new tasks in this task folder. We would like to know if it is possible for an e-mail to be generated whenever a new task is entered into this task folder
0
Comment
Question by:mikcanavan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 22742144
Hi, mikcanavan.

Yes, that's possible with a bit of scripting.  The script would have to be installed on the computer of each person that can enter a task.  I can provide the code if you want to go this route.
0
 
LVL 13

Expert Comment

by:stefri
ID: 22794696
Hi mikcanavan,
Or Right-click the PF
Properties
Tab Administration
Folder Assistant
Add Rule then Check Forward: fill-in To and select th method to be used or Rply-to with a template where To field is the target mailbox
Stefri


0
 

Author Comment

by:mikcanavan
ID: 22795090
Hi BlueDevilFan, Yes I would like to go down the script route. Thank you Stefri for you solution however I could not get this to work.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 22799313
Here's the code.  Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on Module1
4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Close Outlook
9.  Start Outlook
10. Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.Start Outlook

Outlook has to be open and running on the computer this code is on for this to work.  If Outlook is not running, then neither is the code.
Public WithEvents olkFolder As Outlook.Items
 
Private Sub Application_Quit()
    Set olkFolder = Nothing
End Sub
 
Private Sub Application_Startup()
    'Change the path on the next line to that of your folder
    Set olkFolder = OpenOutlookFolder("Public Folders\All Public Folders\My Folder").Items
End Sub
 
Private Sub olkFolder_ItemAdd(ByVal Item As Object)
    Dim olkMsg As Outlook.MailItem
    Set olkMsg = Application.CreateItem(olMailItem)
    With olkMsg
        'Change the address, subject, and body on the following lines as needed
        .Recipients.Add "someone@company.com"
        .Recipients.ResolveAll
        .Subject = "New Item Added"
        .Body = "Something new was added."
        .Send
    End With
    Set olkMsg = Nothing
End Sub
 
Function IsNothing(obj)
  If TypeName(obj) = "Nothing" Then
    IsNothing = True
  Else
    IsNothing = False
  End If
End Function
 
Function OpenOutlookFolder(strFolderPath As String) As Outlook.Folder
    Dim arrFolders As Variant, _
        varFolder As Variant, _
        olkFolder As Outlook.MAPIFolder
    On Error GoTo ehOpenOutlookFolder
    If strFolderPath = "" Then
        Set OpenOutlookFolder = Nothing
    Else
        If Left(strFolderPath, 1) = "\" Then
            strFolderPath = Right(strFolderPath, Len(strFolderPath) - 1)
        End If
        arrFolders = Split(strFolderPath, "\")
        For Each varFolder In arrFolders
            If IsNothing(olkFolder) Then
                Set olkFolder = Session.Folders(varFolder)
            Else
                Set olkFolder = olkFolder.Folders(varFolder)
            End If
        Next
        Set OpenOutlookFolder = olkFolder
    End If
    On Error GoTo 0
    Exit Function
ehOpenOutlookFolder:
    Set OpenOutlookFolder = Nothing
    On Error GoTo 0
End Function

Open in new window

0
 

Author Comment

by:mikcanavan
ID: 23522815
Sorry for the delay.... This worked like a charm!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 23522835
No problem.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read this checklist to learn more about the 15 things you should never include in an email signature.
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question