Solved

Write from Outlook Calendar to Access Database

Posted on 2012-12-28
6
369 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
  • 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

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

Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

911 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

22 Experts available now in Live!

Get 1:1 Help Now