Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Edit / Delete Outlook calendar entries (2003)

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    I have searched few old messages and found a link to help with with adding a calendar entry to Outlook from an Access database ( here ) - changed a few bits around and works well.

    I need a few pointers to allow me to edit and delete these records as required. I'd prefer a similar solution to the above, adding a click button to run code to delete or edit the record after I have selected it. Anyone able to shine some light on the subject?

    I'd also like to be able to change the colour of the bar which is displayed. If I enter the entry directly in Outlook 2003, there is a "Label" option showing none, important, business, etc which provides different colours - what is the field name I need to update to use this field (the .something name)

    Thanks in advance for your help

    John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Edit / Delete Outlook calendar entries (2003)

    What do you mean by "records"?

    The label color is not available in Outlook VBA. You'd need CDO to set it - see Set color label on appointment.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Edit / Delete Outlook calendar entries (2003)

    Thanks for the pointer to CDO - not something I've used before.

    When I have added new calendar entries into Outlook from Access, I have maintained a table of the entries as these give extra information which I don't need to show as an entry in Outlook (these are the records I mentioned).

    As it is possible that people will have moved entries in the Outlook calendar, I wanted to be able to retrieve the calendar entries from Outlook, import them into a new table and use this to update the data held in the original Access table. I have an autonumber field in the original table. This number would be the first part of the description of the calendar entry so I was hoping to use this to control the update of the data. eg. A calendar entry might be "1234 - Install new computer for Fred", so I can use the 1234 as a link to the record in the original table.

    The complete series of events I think I require is:

    1. Create a new record in the events table in Access and add this as a calendar entry in Outlook - DONE
    2. Import Outlook calendar entries to currentcalendar table in Access (need description, date, time etc of entry), update records in the events table in Access

    As an extra to this, I will need the ability to delete a calendar entry based on knowing the value of the autonumber field in the events table. This may involve importing the Outlook calendar entries to the current table file again, finding the specific calendar entry and deleting this from the Outlook table - it's the format of the command to delete the message I don't know.

    Hope this sheds a little more light on my requirements

    John

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Edit / Delete Outlook calendar entries (2003)

    I'd link your Outlook calendar in Access (File | Get External Data | Link Tables, select Outlook() or if applicable Exchange() from the Files of Type dropdown at the bottom of the dialog).
    You can then create an update query to update the Access table with info from the linked Outlook table (or vice versa), and if you delete a record from the linked Outlook table, you're actually deleting the corresponding appointment in Outlook.

    (Please note: you don't get a warning when you delete a record from the linked Outlook table, and the corresponding appointment is deleted permanently, it isn't moved to the Deleted Items folder.

  5. #5
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Edit / Delete Outlook calendar entries (2003)

    I looked at creating a link to the outlook calendar but was surprised to see that it doesn't show all of the fields when I link to this table - particularly, it does not show the date of the calendar entry, the start time or the end time - fairly important parts!

    I've linked via Outlook, presuming that this would be the same using Exchange.

    Am I missing a trick somewhere to show more information? Is there some VBA reference I need to link to to view this additional information - I've included Microsoft Outlook 11.0 Object Library.

    John

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Edit / Delete Outlook calendar entries (2003)

    No, this has nothing to do with object libraries. It's a limitation of the way Access links to Outlook folders - apparently it was created with only e-mails in mind.
    You can still use the linked table to delete an appointment from Access, but you'll need to loop through the items in Outlook's Calendar folder to retrieve the info you need. That is Outlook VBA, however, not Access VBA.

  7. #7
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Edit / Delete Outlook calendar entries (2003)

    OK, I can see how I can use this to delete any particular entry I need (create a delete query with criteria for subject as like "1234 *" .

    For editing, how can I find out the date, start time and end time of the calendar entries if they aren't displayed using the link to Outlook from Access. I need to be able to pass any updates to the events table, but nothing I've found so far allows me to pick up these details. Is that what you mean by "this is Outlook VBA not Access VBA". Do I need to run this routine in a different place? Is there no way to grab all this information within an Access table?

    John

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Edit / Delete Outlook calendar entries (2003)

    You can use Automation to read and manipulate Outlook items from Access. See Wendell’s tutorial Automation 101 for an introduction and useful links.
    Although you'll be using the code in Access, you'll be combining Access VBA and Outlook VBA code - this requires you to be at least somewhat familiar with Outlook VBA.

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Edit / Delete Outlook calendar entries (2003)

    You'll find some examples of manipulating appointment items using code:

    <post:=514,951>post 514,951</post:> (this is in the Outlook forum, but it can be run from Access)
    <post:=465,155>post 465,155</post:>
    The threads starting at <post:=459,906>post 459,906</post:> and <post:=460,236>post 460,236</post:> (although the second one is rather long and confusing)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •