Creating outlook task in VBA

Posted on 2009-12-30
Last Modified: 2013-11-25
I've hacked together some VBA code that will create a task item for a shared users task list.  Can anyone tell me how to create the task so that there is also a copy of the task that gets sent to a shared team task list.  I am trying to automatically distribute and assign tasks for a small work group but would like each person that gets assigned a task to have the ability to easily update the status so that it can be seen by the entire group and possibly displayed on a sharepoint site.  thanks.  The code is below:

    Dim objoutlook As Object
    Dim oNameSpace As Object
    Dim oSpDesk As Object
    Dim oFolder As Object
    Dim objtask As Object
     Set objoutlook = CreateObject("Outlook.Application")

    Set oNameSpace = objoutlook.GetNameSpace("MAPI")
    Set oSpDesk = oNameSpace.CreateRecipient("blow, joe")
    Set oFolder = oNameSpace.GetSharedDefaultFolder(oSpDesk, 13)   '13 = olFolderTasks
    Set objtask = oFolder.Items.Add
        objtask.Subject = "Test"
        objtask.DueDate = CDate("12/30/2009")
        objtask.ReminderSet = True
Question by:HelpMePlease777
    LVL 28

    Accepted Solution

    You need to build this from Sharepoint, not Outlook

    Author Comment

    by:HelpMePlease777 you care to elaborate....thanks.
    LVL 28

    Expert Comment

    This is big. Not suited for this forum. You use Outlook and Sharepoint. You address many users. The better platform is thus Sharepoint as Outlook is personal and the logged-in user has no rights outside herself. Sharepoint has. Hire someone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now