Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / June 2007

Tip: Looking for answers? Try searching our database.

Getting tasks from Access database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Wright - 25 Jun 2007 16:23 GMT
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
amitbhandari - 30 Jun 2007 07:54 GMT
John,
Yes, of course, you can do this rather I'll say it's a childs' play to do
all this.
However, if you say that you want to create To-do list out of that then I'll
add
its more trickier since the To-do list folder is virtual one and you need to
access
the Store to add items to To-do list folder.

See, it is independent of thing whether you want this piece of work done as
a
standalone application or Add-in from Outlook, if you are using OOM. I could
have
given you the code but that will not suffice your needs as you should write
this piece
of code according to your needs. All I can help is to provide you some
insight on
using OOM.

Before, you start, have a look at OOM structure at MSDN. Now, include the
COM library
reference in your project to Microsoft Outlook Object Library. The steps
that you need
to follow are:
1) Create an object of ApplicationClass
2) Open your access database file
3) Get a reference to the Tasks folder using MapiFolder mf = (MAPIFolder)
           app.GetDefaultFolder(olFolderType.olFolderTasks)
4) For each record in your access file, use app.CreateItem() function
5) Typecast to TaskItem object and set the appropriate properties after
reading the
       columns of database
6) Call Save method
7) Viola!! you are done.

That's all with it. Now, iterate steps 4 through 6 for all the records in
your access file.

Signature

Regards,
Amit Bhandari
http://amitbhandari.co.nr

>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
[quoted text clipped - 5 lines]
>
> John Wright
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.