Import Task via Web Link

Posted on 2006-04-08
Last Modified: 2010-04-08
I've got my own web based task management system and what I want to be able to do is click on a link for a particular task which imports the task into Outlook 2003.  Need to know how to set this up.


Question by:delvin
    1 Comment
    LVL 76

    Accepted Solution

    Hi delvin,

    The code below works quite well for me.  I connect it to a link on the web page.  When that link is clicked the code fires and creates a task based on the content of the page.

        Sub MakeTask()
            dim objApp, objNS, objTask
            Set objApp = CreateObject("Outlook.Application")
            Set objNS = objApp.GetNamespace("MAPI")
            Set objTask = objApp.CreateItem(3)
            With objTask
                .Subject = document.getElementById("PlanName").value
                .DueDate = CDate(document.getElementById("DateDue").value)
                .Body = "Description" & vbCrlf & document.getElementById("Description").value & vbCrLf & vbCrLf & _
                    "Activities" & vbCrLf & _
                    "* 1st Quarter" & vbCrLf & document.getElementById("Q1").value & vbCrLf & _
                    "* 2nd Quarter" & vbCrLf & document.getElementById("Q2").value & vbCrLf & _
                    "* 3rd Quarter" & vbCrLf & document.getElementById("Q3").value & vbCrLf & _
                    "* 4th Quarter" & vbCrLf & document.getElementById("Q4").value & vbCrLf
                .Categories = "Plans"
            End With
            Set objTask = Nothing
            Set objNS = Nothing
            Set objApp = Nothing
        End Sub


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Use email signature images to promote corporate certifications and industry awards.
    Sometimes Outlook might have problems sending a message. There may be various causes- corrupted PST, AV scanner etc. The message, instead of going to the Sent Items folder, sits in the Outbox indefinitely. To remove it you can use a free tool cal…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    737 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

    21 Experts available now in Live!

    Get 1:1 Help Now