![]() |
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 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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |