Set task on local computer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

One function of a database I have set up on a network, is to set up
tasks/appointments for the users. Overall this works fine... however some
users are not always logged on to the server, and therefore are not using
Outlook on through the server which is where the appointment/task item has
been set up. How can I set up an appointment or task on to their local
computer?
 
You could email the task to them as an attachment.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Thanks for the suggestion.

Sue Mosher said:
You could email the task to them as an attachment.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
I'm sorry... I tried this, and maybe I am misunderstanding. I have tried
creating the object (createitem(taskitem)) and attaching it (.attachments.add
objtaskitem). I get an error message "the server threw an exception". So
far, I haven't been able to find information on this error message and have
no idea what the problem is (new to working with outlook, sorry!).

I am testing this on my local pc, not on a network environment and am using
Windows and Office XP.

Here is the actual code snippet:
Dim objTaskItem As Outlook.TaskItem
Set objOutlook = Outlook.Application
Set objMessage = objOutlook.CreateItem(olMailItem)
Set objTaskItem = objOutlook.CreateItem(olTaskItem)
objTaskItem.Subject = strReminder
objTaskItem.DueDate = dteStartDate
objTaskItem.Save

'email message settings
With objMessage
.To = strAddrList 'strBlindCopy
.CC = strHRMgr
.BCC = strBlindCopy
.Attachments.Add objTaskItem
.Subject = strSubject
.Body = strMessage
.Send
End With

Thanks again for your help!
 
That code snippet runs fine here on Outlook 2003 SP2. On your system, what statement raises the error? What's a typical value for dteStartDate?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
I get the error on the 'attachments.add' statement. When I wasn't stepping
through, I just got the message "method of 'add' object of 'attachments'
failed". The date is in the "mm/dd/yyyy" format - so maybe 6/01/2006.

Thanks (again!).
 
If you're attaching an Outlook item, usually you need to specify that in your Attachments.Add expression:

.Attachments.Add objTaskItem, olEmbeddeditem

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top