+ Reply to Thread
Results 1 to 2 of 2

Exporting Excel Schedule to Outlook Calendar Subfolders

  1. #1
    Registered User
    Join Date
    06-02-2005
    Posts
    22

    Exporting Excel Schedule to Outlook Calendar Subfolders

    I know it is possible to export information from Excel into the Outlook default calendar. Is it possible to export information to subfolders under Outlook calendar? If so, how would I go about doing that using code from within Excel? Thank you very much.

  2. #2
    Registered User
    Join Date
    06-02-2005
    Posts
    22
    This is my code so far:

    Sub Outlook_Calendar_Subfolder()

    Dim olApp As Object
    Dim olApt As Object
    Dim olSubject As Range
    Dim olBody As Range
    Dim olDate As Range
    Dim olLocation As Range

    Set olSubject = Sheet1.Cells.Item(1, "A")
    Set olBody = Sheet1.Cells.Item(1, "B")
    Set olDate = Sheet1.Cells.Item(1, "C")
    Set olLocation = Sheet1.Cells.Item(1, "D")
    Set olApp = CreateObject("Outlook.Application")
    Set olApt = olApp.CreateItem(1)
    Set myNameSpace = olApp.GetNameSpace("MAPI")
    Set myfolder = myNameSpace.GetDefaultFolder(9)
    Set mynewfolder = myfolder.Folders("123 Anywhere St.")

    With olApt
    .AllDayEvent = True
    .Start = olDate
    .Subject = olSubject
    .Location = olLocation
    .Body = olBody
    .BusyStatus = 0
    .ReminderSet = False
    .Save
    End With

    Set olApp = Nothing
    Set olApt = Nothing

    End Sub

    As of now it still simply copies the information to the default folder. How do i get it to copy the information into the referenced subfolder?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1