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

Getting tasks from access



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 25th 07, 05:24 PM posted to microsoft.public.outlook.program_vba
John Wright
external usenet poster
 
Posts: 2
Default Getting tasks from access

I want to import a table from access into outlook's task folder. I have a
sales group of people that need to retrieve items from this database and add
it to their tasks. I would like this to be automated to kick off every two
hours. Can this be done? Does anyone have any code as an example for
this? I am an experienced VB programmer (.net and classic) but have done
very little programming in Outlook itself. The program needs to be
contained within Outlook. Any code, or examples would be great.

John Wright


  #2  
Old June 26th 07, 08:13 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Getting tasks from access

The only way to automate this on a schedule would be to create a series of
recurring tasks - one for each 2 hour block. Then you can trap the Task and
see if it's your scheduled import task (for example, use the Subject line or
Category to differentiate them from other tasks):

Dim WithEvents myolapp As Outlook.Application

Sub Initialize_handler()
Set myolapp = CreateObject("Outlook.Application")
End Sub

Private Sub myolapp_Reminder(ByVal Item As Object)
Item.Display
'Or do something else - i.e. call a database import proc
End Sub

Once you've validated that this a reminder for the task you want, fire up
your query to return the records from the database. Then use
Application.CreateItem(olTaskItem) to return a new TaskItem object for each
record, setting the object's properties from the data before you save it to
the default Tasks folders (which is where the Task will be saved unless you
want it in another folder - then you'd use MAPIFolder.Items.Add("IPM.Task").

See here for more info:

Connecting Outlook to Databases:
http://www.outlookcode.com/article.aspx?ID=25

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"John Wright" wrote:

I want to import a table from access into outlook's task folder. I have a
sales group of people that need to retrieve items from this database and add
it to their tasks. I would like this to be automated to kick off every two
hours. Can this be done? Does anyone have any code as an example for
this? I am an experienced VB programmer (.net and classic) but have done
very little programming in Outlook itself. The program needs to be
contained within Outlook. Any code, or examples would be great.

John Wright



 




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
Importing Items from an Access 2003 database to tasks John Wright Outlook - General Queries 0 June 25th 07 05:23 PM
Tasks--Export to MS Access craigs Outlook and VBA 2 August 15th 06 03:49 PM
Tasks - User Defined Columns to Pocket PC Tasks??? Lovebaby Outlook - General Queries 1 July 23rd 06 09:14 PM
Backup your Outlook calendar, address book, notes, tasks...etc online, synchronize it across several locations, and get web access to all these data! [email protected] Outlook - Calandaring 1 April 14th 06 07:31 PM
Importing Tasks from Access on startup Grant Bush Outlook and VBA 7 March 10th 06 06:35 PM


All times are GMT +1. The time now is 07:05 AM.


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.