![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I know this is a VBA group but I can't seem to get an answer from the VFP
group on this subject. I need to create a new TASK and send it to the person I pick from a drop-down menu. This has to be done in FOXPRO (VFP9.0-SP2). I can get to Outlook and create/send an email, but I can not figure out how to create/send a TASK. Any help/sample code will be great. Thanks in advance -- Lost in Tampa |
Ads |
#2
|
|||
|
|||
![]()
I don't have a clue as to how you'd do it in VFP, but if you are using the
CreateItem() method with an olMailItem argument to create a mail item substitute the olTaskItem enum member instead. From there you need to add various properties before you call the Assign() method of the task. See the VBA object browser help for TaskItem.Assign to see how to set what you need using VBA code. You will need to translate that into VFP code. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "bbettsack" wrote in message ... I know this is a VBA group but I can't seem to get an answer from the VFP group on this subject. I need to create a new TASK and send it to the person I pick from a drop-down menu. This has to be done in FOXPRO (VFP9.0-SP2). I can get to Outlook and create/send an email, but I can not figure out how to create/send a TASK. Any help/sample code will be great. Thanks in advance -- Lost in Tampa |
#3
|
|||
|
|||
![]()
I figured out the code and am posting it here in case anyone else needs it.
* This program will create a TASK in Outlook (Office 2007) oOutlook = CreateObject('Outlook.Application') oNameSpace = oOutlook.GetNameSpace('MAPI') oNameSpace.Logon() loItem = oOutlook.CreateItem(3) #DEFINE CR CHR(13) WITH loItem .Subject = 'New Task - test' .Body = 'Here is the newest TASK that has been assigned to you.' ') .StartDate = '05/01/2010' .DueDate = '05/15/2010' .ReminderSet = 1 .ReminderTime = CTOT(SYS(10,reminder_date) + ' 09:00') ENDWITH loItem.Save() loItem.Assign() loItem.Send() =MESSAGEBOX('TASK Sent.',64,'Status') -- Lost in Tampa "Ken Slovak - [MVP - Outlook]" wrote: I don't have a clue as to how you'd do it in VFP, but if you are using the CreateItem() method with an olMailItem argument to create a mail item substitute the olTaskItem enum member instead. From there you need to add various properties before you call the Assign() method of the task. See the VBA object browser help for TaskItem.Assign to see how to set what you need using VBA code. You will need to translate that into VFP code. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "bbettsack" wrote in message ... I know this is a VBA group but I can't seem to get an answer from the VFP group on this subject. I need to create a new TASK and send it to the person I pick from a drop-down menu. This has to be done in FOXPRO (VFP9.0-SP2). I can get to Outlook and create/send an email, but I can not figure out how to create/send a TASK. Any help/sample code will be great. Thanks in advance -- Lost in Tampa . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating Task Views Methodically | tomthedev | Outlook and VBA | 7 | October 30th 09 03:54 PM |
Creating a Task with VBScript | yannickestrada | Outlook and VBA | 14 | July 28th 09 07:47 PM |
Help Desk and Assigned Help Task Sample not creating task on cliK | doc4a | Outlook - Using Forms | 0 | July 16th 08 10:47 PM |
Creating a task in Outlook from Access | Blogd_Node | Outlook and VBA | 4 | February 3rd 07 05:38 AM |
Creating Task sometimes collapses group | T. Wise | Outlook - General Queries | 3 | July 14th 06 05:46 AM |