Can you Link Access 2007 to Outlook 2007

Dannyc989

Registered User.
Local time
Today, 09:32
Joined
Dec 18, 2013
Messages
46
I know this seems like a really novice question but I am slowly learning more about access as I go through. I will give you the scenario.

There is 1-2 people who co ordinate the employees diary's in Outlook 2007, for all employees, I wanted to create a form within the database which is still in its early stages of development, that will create a individual job on each record, with a start and end date and time, and will allow these 2 people to update the persons diary to which the job is assigned in Outlook. But I am truly :banghead:, trying to even get started. if anyone could help I would be most greatful.

Kind Regards

Daniel
 
This might be more than what you can chew at this time, but it's a start.
Once you have your input form designed, in your button's click event, whatever you happened to name this button (Ok, Save, Post, etc.) you call this function passing it the parameter you see fit, in this example, you're passing it three parameters, the task subject, the body, and the date.

Code:
' This requires the Microsoft Outlook 12.0 Object Library in the database's references

Public Sub s_AddOutlookAppointment(strTaskSubject As String, strTaskBody As String, dteDate As Date)
    Dim objOutlook As New Outlook.Application
    Dim objTask As AppointmentItem
    
    On Error GoTo OutError
    
    Set objTask = objOutlook.CreateItem(olAppointmentItem)
    
    With objTask
        .Start = Date
        .Subject = strTaskSubject ' Task's Subject line
        .Start = dteDate '  starting time"
        .End = dteDate '  ending time"
        .body = strTaskBody
        .Save
    End With
ExitPoint:
    Set objTask = Nothing
    Set objOutlook = Nothing
    Exit Sub
OutError:
    MsgBox "s_CreateTaskInOutlook: " & Err.Description, vbExclamation, "Error"
    GoTo ExitPoint
End Sub
 
Ok I think I understand that... But does that put the event into one particular persons diary?? For example the task is created by person A who is logged into there outlook but it needs to go into person G diary... Thanks for your promt reply
 

Users who are viewing this thread

Back
Top Bottom