A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Creating a new TASK using VFP9.0



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 7th 10, 04:41 PM posted to microsoft.public.outlook.program_vba
bbettsack
external usenet poster
 
Posts: 2
Default Creating a new TASK using VFP9.0

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  
Old May 7th 10, 07:04 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Creating a new TASK using VFP9.0

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  
Old May 19th 10, 05:59 PM posted to microsoft.public.outlook.program_vba
bbettsack
external usenet poster
 
Posts: 2
Default Creating a new TASK using VFP9.0

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 08:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.