1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Syncing Outlook calendar with multiple dates in Excel

Discussion in 'Business Applications' started by Essay, Jun 14, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. Essay

    Essay Thread Starter

    Joined:
    Jun 14, 2012
    Messages:
    2
    Hello,
    I am learner, who wants to automatize his repetition through combination of Excel and Outlook. I've read some posts on this forum and I see, that it is possible. However, I am totally lame in both Excel and Outlook and script writing. Yup, I am total tech noob. :)

    I want it to look like this (behold, paint-edited picture):

    [​IMG]

    I learn something, then I write down what I learned in excel spreadsheet ('WHAT?' in the spreadsheet) and give it a CODE, which would be shown in Outlook calendar. I write down the in which I learned and my outlook calendar syncs with every one of six repetitions.

    I found some VBA (?) codes on this message board, but I have no idea how to implement them to my excel (and even less idea how to change the code). I would really appreciate if you would give me some hints or link (except for google.com :p) where this process is described.

    Here is link to my excel spreadsheet, if you want.

    Thanks in advance.
    Essay

    http://speedy.sh/QtzQ5/Repetitions.xlsx
     
  2. Essay

    Essay Thread Starter

    Joined:
    Jun 14, 2012
    Messages:
    2
    Trying again...
    Can anyone help me to incorporate script like this, to sync my excel spreadsheet with my outlook calendar?

    Code:
    Sub ExportAppointmentsToOutlook()
    
        Dim olApp As Outlook.Application
        Dim olApt As AppointmentItem
        Dim blnCreated As Boolean
        
    'Read the table with appointments:
        Dim arrAppt() As Variant, i As Long
        arrAppt = Range("A2", Cells(Rows.Count, "E").End(xlUp)).Value
        On Error Resume Next
        Set olApp = GetObject(, "Outlook.Application")
        If olApp Is Nothing Then
            Set olApp = CreateObject("Outlook.Application")
            blnCreated = True
            Err.Clear
        Else
            blnCreated = False
        End If
        On Error GoTo 0
    
    'Create the outlook item for the table entries:
    'Rows:
    ' Row 1 = date
    ' Row 2 = starttime
    ' Row 3 = endtime
    ' Row 4 = Description
    ' Row 5 = Location
    
        For i = LBound(arrAppt) To UBound(arrAppt)
        Set olApt = olApp.CreateItem(olAppointmentItem)
    
        With olApt
            .Start = arrAppt(i, 1) + arrAppt(i, 2)
            .End = arrAppt(i, 1) + arrAppt(i, 3)
            .Subject = arrAppt(i, 4)
            .Location = arrAppt(i, 5)
            .Body = "Created by excel tool"
            .BusyStatus = olBusy
            .ReminderMinutesBeforeStart = 5
            .ReminderSet = True
            .Save
        End With
        Next i
    
    
        Set olApt = Nothing
        Set olApp = Nothing
    
    End Sub
    In my case there is less variables, as date = column F, name = Column C.

    I would be immensely appreciative...
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1057033