Solved

Write from Outlook Calendar to Access Database

Posted on 2012-12-28
6
376 Views
Last Modified: 2013-01-02
We have an application that dymaically writes from an Access Database to a Shared Public Exchange Calendar.  When a user changes a date in the Database, it automatically adds, deletes or moves the item on this public calendar.

Now the users want to be able to move one of the items on the OUtlook Calendar and have it change the date in the Access Database.  

How can I do this?  I do have unique data that I link the field with the OUtlook object, so that isn't a problem.  I just don't know in Outlook VBA how to tell it to look at a Calendar entry and when it changes to do something.

Cheers for any guidance!
0
Comment
Question by:sharpapproach
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38727413
Have you considered 'Linking' the Outlook data into Access?

Last time I checked, changes worked from both ways...
0
 

Author Comment

by:sharpapproach
ID: 38727723
That feature just creates a linked table.  We have our database that as users add and move things in different tables/fields, etc, then the Calendar updates.  

However, now the users to go the other way.

I have a public calendar called "Study Schedule", and when a user moves an item from one date to another, I have to have it go change some things in access.

I can't figure out how to know in Outlook VBA that a Public Calendar item has been moved/deleted/edited, etc.

If I can figure that out, I should be good to go.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38727787
Then this seems to be more complex than I had originally thought...

Please wait for other Experts to reply
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Accepted Solution

by:
sharpapproach earned 0 total points
ID: 38727824
After 2 hours of trying things , I figured it out... Add this code to the ThisOutlookSession Code:

Dim WithEvents m_objAppt As Outlook.AppointmentItem

Private Sub Application_ItemLoad(ByVal Item As Object)
    On Error Resume Next
    Dim strClass As String
    Select Case Item.Class
        Case olAppointment
            Set m_objAppt = Item
      End Select
End Sub

Private Sub m_objAppt_Open(Cancel As Boolean)
    'Put code here for opening
    'for example, to look at the subject
    '.m_objAppt.Subject
End Sub

Private Sub m_objAppt_Read()
    'put read code here.
End Sub

Private Sub m_objAppt_Unload()
    'don't put code here because object model won't see it.
   ' Set m_objAppt = Nothing
End Sub
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38727879
Great,
Congrats on getting it working, and thanks for sharing the solution with the community.
;-)

Jeff
0
 

Author Closing Comment

by:sharpapproach
ID: 38736031
Figured it out myself and posted code for future users
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Starting up a Project

695 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