?
Solved

Outlook VBA question creating and assigning a task.

Posted on 2009-12-31
9
Medium Priority
?
1,274 Views
Last Modified: 2012-05-08
I have the following vba code that will create a new task item in a public folder.  I need to know how to assign the task to a specific individual....I'm assuming once this is done the reminder will work correctly.  Thanks for your help.
Dim ol As Outlook.Application
  Dim olns  As Outlook.Namespace
  Dim myFolder1 As Object
  Dim myFolder2 As Object
  Dim myFolder3 As Object
  Dim myDelegate As Outlook.Recipients
  
   Set ol = New Outlook.Application
   Set olns = ol.GetNamespace("MAPI")
   Set myFolder1 = olns.Folders("SharePoint Lists")
   Set myFolder2 = myFolder1.Folders("Projects - Tasks")
  
  

    Set objtask = myFolder2.Items.Add
        objtask.Subject = "Flow Test 3"
        objtask.DueDate = CDate("12/31/2009")
        objtask.ReminderSet = True
        objtask.ReminderTime = "10:00 pm"
    objtask.Save

Open in new window

0
Comment
Question by:HelpMePlease777
  • 5
  • 4
9 Comments
 

Author Comment

by:HelpMePlease777
ID: 26153986
OK.... I figured out how to assign the task but now the reminder is not set.   My goal is to create multiple tasks for several people in  a public folder so that they get reminder prompts in their outlook and the work group can all pull up the master list of tasks and see what has been completed.  Seems simple enough.  
 Dim ol As Outlook.Application
  Dim olns  As Outlook.Namespace
  Dim myFolder1 As Object
  Dim myFolder2 As Object
  Dim myFolder3 As Object
  Dim myDelegate As Outlook.Recipient
  
   Set ol = New Outlook.Application
   Set olns = ol.GetNamespace("MAPI")
   Set myFolder1 = olns.Folders("SharePoint Lists")
   Set myFolder2 = myFolder1.Folders("Projects - Tasks")
 
    Set objtask = myFolder2.Items.Add
    
    
        objtask.Subject = "Flow Test 3"
        objtask.DueDate = CDate("12/31/2009")
        objtask.ReminderSet = True
        objtask.ReminderTime = "10:00 pm"
     
    objtask.Save
    objtask.Assign
    Set myDelegate = objtask.Recipients.Add("joe blow")
    

End Sub

Open in new window

0
 
LVL 76

Expert Comment

by:David Lee
ID: 26156966
Hi, HelpMePlease777.

Reminders do not work for public folders.
0
 

Author Comment

by:HelpMePlease777
ID: 26171068
I have a public task list,  I can open it up and create a new task and assign it to a given individual, and setup a reminder, which all appears to work fine.  Is there no way to do this in code?
0
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.

 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 26179201
I guess I don't understand the question.  Reminders do not work in public folders.  By that I mean that you can create a reminder but Outlook will NOT display the reminder message at the prescribed date/time.  In fact when setting a reminder on an item in a Public Folder Outlook should notify you that the reminder will not work (see the screen shot below).  If your question is "can I create a reminder from code", then the answer is yes.  If instead the question is "can I make the reminder fire from code", then the answer is no.  If you want reminders to work from a public folder, then you'll need a 3rd-party tool like this one: http://www.slovaktech.com/remindermanager.htm
PF-Reminder.jpg
0
 

Author Comment

by:HelpMePlease777
ID: 26180041
Thanks......yep I discovered yesterday that they did not work the way I thought.  I'm actually trying to modify a share point list....but I'm assuming this has the same functionality as a public folder.  I will take a look at the 3rd party tool.  All I really need is a way to create and assign tasks through code and then have the entire team see the progress as the tasks are completed, am I missing something simple?
0
 

Author Comment

by:HelpMePlease777
ID: 26180046
And the key is that the users that get assigned the tasks have reminders set so they will receive prompts.  Thanks
0
 
LVL 76

Expert Comment

by:David Lee
ID: 26180135
SharePoint and Outlook/Exchange do not have the functionality.  I am not a SharePoint expert, but I believe it has a notification feature that Outlook/Exchange does not have.  For example, the ability to subscribe to a list of documents and receive a notification whenever and items is added, deleted, changed, etc.  SharePoint also has its own intrinsic task capability including workflows, something that Outlook/Exchange has no concept of.  

Outlook tasks are rudimentary and are not geared toward teams.  They are geared toward individuals.  
0
 

Author Comment

by:HelpMePlease777
ID: 26180402
Thanks again for your help.  I have looked briefly at the sharepoint functionality......I don't see any way to force reminders to pop up when a task is due....which is my main goal.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 26180741
You're welcome.

Keeping in mind that my knowledge of SharePoint is limited, I don't think there's a way to get it to pop up a reminder.  I do think it's possible for SharePoint to generate a reminder email.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
MS Outlook undoubtedly is the most widely used email client.Its user-friendliness, cost effectiveness, and availability with Microsoft Office Suite make it the most popular email application.  Its compatibility with Microsoft applications like Exch…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

850 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