Solved

Outlook tasks

Posted on 1998-09-06
5
260 Views
Last Modified: 2010-04-30
I am trying to access my tasks in Outlook 97 from vb 5.0, and put them into a table in MS Access 8.0. I would like to place each field in my tasks folder into a corrsponding field in the Access table. What is the code I need to do this?
0
Comment
Question by:damonc090698
  • 3
  • 2
5 Comments
 

Author Comment

by:damonc090698
ID: 1433326
Edited text of question
0
 
LVL 2

Expert Comment

by:Veroland
ID: 1433327
do you want the code for outlook or the code for Access, or both ?
0
 

Author Comment

by:damonc090698
ID: 1433328
I need the vb 5.0 code to go into Outlook read the tasks and put them into Access. I want the code in VB 5.0!
0
 
LVL 2

Accepted Solution

by:
Veroland earned 50 total points
ID: 1433329
For this example I have referenced DAO 3.5 and the msoutl85.olb file. There is a help file available (confusing though) called VBAOUTL.HLP wich is on the msoffice CD. Notify me if you want more info.

    Dim oApplic As Object
    Dim oItem As Object
    Dim olNameSpace As Object
    Dim DB As Database
    Dim SQL As String
    Dim I As Integer
       
    'connect to access database
    Set DB = OpenDatabase(App.Path & "\MyDB.mdb")
   
    'connect to the Outlook tasks
    Set oApplic = CreateObject("Outlook.Application")
    Set olNameSpace = oApplic.GetNamespace("MAPI")
    Set oItem = olNameSpace.GetDefaultFolder(olFolderTasks)
   
    'get the outlook tasks and insert access database
    For I = 1 To oItem.Items.Count
        SQL = "Insert into AccessTasks (TaskName) select '" & oItem.Items(I) & "'"
        DB.Execute SQL
    Next I
0
 

Author Comment

by:damonc090698
ID: 1433330
Thanks! It worked great!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to skip loop 6 54
String manipulation in Visual Basic 7 59
to transfer string from C lanaguage to VBA 4 56
MS SQL store procedure to calculate and return result 6 49
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now