[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Import Task via Web Link

Posted on 2006-04-08
Medium Priority
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

David Lee earned 500 total points
ID: 16407358
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


Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

834 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