Results 1 to 3 of 3
  1. #1
    Nobby2193 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    12

    Multiple outlook calanders from Access

    Hi All


    First post here so please be gentle

    I wrote a database for a hospital transport charity which allows me to pair up a client with a driver then to a destination ( usually hospitals or Dentists) to make a patients appointment time

    They are happy with the database ( why shouldn't they be as it was free !), but would love to be able to view outlook \google calendars locally for each driver ( although i have produced a drivers day appointment report)

    This would mean identifying each driver and appointment time, client name, destination etc, opening up the an outlook \google calendar for that driver and adding the appointment on to it

    I have some code that will do this for one driver but could do with expanding this for multiple ( possibly up to 20 volunteers)
    I have asked another well known Forum but had no reply

    Many Thanks
    Attached Files Attached Files

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I did not look at your app, but the following might get you started.
    Code:
    Dim oApp As New Outlook.Application
    Dim oNamespace As Outlook.NameSpace
    'Dim oAccounts As Outlook.Accounts
    'Dim oAccount As Outlook.account
    Dim intCount As Integer
    intCount = 1
    
    Dim oExplorer As Outlook.Explorer
    Dim oCalendarModule As Outlook.CalendarModule
    Dim oNavigationFolders As Outlook.NavigationFolders
    Dim oNavigationFolder As Outlook.NavigationFolder
    Dim oNavigationGroup As Outlook.NavigationGroup
    Dim myFolder As Outlook.Folder
    
    Set oNamespace = oApp.Session
    
    'Dim varItem As Variant
    '
    'Set varItem = oNamespace.GetDefaultFolder(olFolderCalendar)
    'Debug.Print varItem.Name
    'Debug.Print TypeName(varItem)
    
    Set oExplorer = oNamespace.GetDefaultFolder(olFolderCalendar).GetExplorer
    Set oCalendarModule = oExplorer.NavigationPane.Modules.GetNavigationModule(olModuleCalendar)
    Set oNavigationGroup = oCalendarModule.NavigationGroups.Item("My Calendars")
    
    For Each oNavigationFolder In oNavigationGroup.NavigationFolders
        
        Debug.Print TypeName(oNavigationFolder) & " item " & intCount
        Debug.Print oNavigationFolder.Folder.FullFolderPath
        
            Set myFolder = oNavigationFolder.Folder
            Debug.Print myFolder.GetCalendarExporter.StartDate
    
    intCount = intCount + 1
    Next oNavigationFolder
    
    Set myFolder = Nothing
    Set oNavigationGroup = Nothing
    Set oCalendarModule = Nothing
    Set oExplorer = Nothing
    Set oNamespace = Nothing
    Set oApp = Nothing

  3. #3
    Nobby2193 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Posts
    12
    Hi Itsme and thanks for a prompt reply

    Im not going to be at my desk for a little while so wont be able to convert this into my database to test

    I will have a good look at it and come back to you to let you know

    many thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-20-2015, 03:21 PM
  2. Replies: 0
    Last Post: 12-15-2014, 08:18 AM
  3. help adding multiple entries to outlook
    By Goli1984 in forum Programming
    Replies: 1
    Last Post: 01-26-2012, 03:35 PM
  4. Assigning Outlook task from shared Outlook mailbox
    By Remster in forum Programming
    Replies: 2
    Last Post: 11-16-2011, 04:38 AM
  5. Send multiple e-mails through Outlook based on query
    By dataphile in forum Programming
    Replies: 3
    Last Post: 12-30-2009, 12:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums