+ Reply to Thread
Results 1 to 16 of 16

Populating data from an excel spreadsheet to Outlook Calender

  1. #1
    Registered User
    Join Date
    11-22-2010
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Populating data from an excel spreadsheet to Outlook Calender

    Hello,

    I am looking for some assistance. I am a beginner in the world of VBA. I am using Excel 2007. I am trying to use an excel spreadsheet to populate my teams outlook calender. Attached is the spreadsheet that I am working with (Worksheet 1).

    What I am looking to do a few things with this data.....

    1. I am looking to polulate the outlook calender using the date in column F
    2. The subject line of the outlook calender entry is column A "-" column D
    3. The location line of the outlook calender entry is column E
    4. The body of the outlook calender entry should look as follows:
    Column A
    Column B if anything is in the cell
    Column C if anything is in the cell
    Column G if anything is in the cell
    5. The start time should be 7 AM
    6. The end time should be 7:01 AM. (it is okay to have multiple meetings at the same time, but if possible to make any on the same day follow each other (ex. the next one will start at 7:01 and go to 7:02, it is appreciated but not necessary)

    This will all fit into a command button that each manager will be able to push (I have this already written). If it is possible, I would only like it to populate the outlook of the assigned executive in column H, If there is not an assigned executive, then I would liek that line to populate all peoples calender that push the command button.

    I have tried to use generic code off of the internet (but not understanding the Outlook code it is difficult for me). The first error I received was that one of the Tools/Reference items was not checked off. To ensure that any code you help me with works, please indicate if I need to check special tabs in this area for excel and for outlook.

    I know that I may not be specific enough here so if you have any questions, please ask me and I will be more then forward with the information you may need, also any explanations you can give so I actually understand what you are doing is great.

    Thank you in advance for your time and assistance.
    Attached Files Attached Files
    Last edited by jsgray; 12-02-2010 at 10:50 AM.

  2. #2
    Registered User
    Join Date
    11-22-2010
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Populating data from an excel spreadsheet to Outlook Calender

    I am looking for any and all help possible to help me with this conundrum. If anyone has the ability to help, It would be greatly appreciated. Thank you for any time you can donate to my cause.

    In advance, Thank you for your time and efforts.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Hi jsgray

    Are the Calendar Names in Outlook the same as the name listed under Assigned Executive in Sheet1?

    What Version of Outlook are you using?

    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Populating data from an excel spreadsheet to Outlook Calender

    I did a google search "populate outlook calendar from excel" and got lots of hits.

    This is not something I have done in the past.

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Hi jsgray

    I've developed some code that does most of what you require. It populates the calendar as you described (based on my perception of your description). I'm fairly certain I can't do this
    if possible to make any on the same day follow each other (ex. the next one will start at 7:01 and go to 7:02
    This has been done in the code
    I would only like it to populate the outlook of the assigned executive in column H
    This is accomplished by a table in the code that correlates the logged in user name with users mailbox name.

    This has been done in the code
    If there is not an assigned executive, then I would like that line to populate all peoples calender that push the command button
    This is accomplished the same way as above.

    A major issue. Each time a given user presses the command button, a calendar event will be created for all items applicable to that user such that the same event will be added again and again. I can overcome this by simply flagging the event as having been processed.

    This approach works if there is an assigned executive. It doesn't work if there is no assigned executive. If an unassigned executive event is flagged because someone pressed the button, nobody else will get that event.

    A way to overcome this is to send that unassigned event to EVERYONE then flag it as being sent. I know of no way to check if a calendar event already exists in Outlook.

    From my previous post
    Are the Calendar Names in Outlook the same as the name listed under Assigned Executive in Sheet1?

    What Version of Outlook are you using?
    What are your thoughts?

    John

  6. #6
    Registered User
    Join Date
    11-22-2010
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Hello Jaslake,

    First and formost, I would like to express my appreciation and gratitude for your assistance.

    THANK YOU

    Now to answer your questions:
    1. for the purposes of what we are doing, the names that I use will not be the same as listed in sheet 1. The spreadsheet is hand entered and the names will never be the full name and surname, it will always be a quick ititials or a nickname. for example Madeline, will be Mad, Tiziana will be Tiz, in our outlook they are full first, (sometimes middle initial) and last name. The nicknames will always be the same. There are only 5 people getting this spreadsheet.

    2. I use Outlook and Excel 2007

    Now for your long message:

    1. The 7:00, 7:01, 7:02 meeting times is in a perfect world for me. It is not that important. I would like all meetings to schedule at 7 am est, overlapping meetings are fine. This is more of a daily reminder to make sure all resources are properly routed.

    2. As of right now, I have this excel spreadsheet with the command button going out to 5 people. These people, are getting a copy of the spreadsheet. So flagging the events as done, is not that important (I don't think it will work, because we are not using the actual database (spreadsheet)). So there is no need for the flagging of the events.

    I hope I answered all of your questions?

    I do have one more request, if it is possible, can the Event have a reminder that goes off 1 week prior to the date in column F "Event Date"?

    I cannot say thank you enough for your time and assistance. It is greatly appreciated.

    Regards

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Hi jsgray

    Trying to understand your process.

    Each day (or periodically) the spreadsheet is emailed (sent out somehow) to five recipients. They each open the excel file on their computer and press a command button. A macro is then executed to create calendar events in their copy of Outlook for the person that pressed the command button.

    If this is correct and if each person is using their own Default Outlook Calendar, the code becomes simpler. I just need to know "Who pushed the button".

    I need something that tells me which Assigned Executive is sitting in front of the computer. I also need to know what "Nickname" is associated with that Assigned Executive (the nicknames MUST be spelled consistently the same). I also need to know if the Default Calendar is being used.

    One approach to finding out who's sitting in front of the computer is to look in the computer's "Environment" and see who's logged on. That's the approach I've taken. Of course, if everyone logs on as "Administrator" this won't work.

    So, assuming each of the five individuals has a unique user name and I can relate a nickname to each user name and each individual is using their Default Calendar, I believe I can make the procedure do as you require.

    I'd suggest you put data validation on Column H of your data file. The names in your sample file are not spelled consistently.

    I'll await your feedback.

    John

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Hi jsgray

    Play with the attached. Based on my understanding and assumptions, it performs as expected.

    Let me know of issues.

    John
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-22-2010
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Populating data from an excel spreadsheet to Outlook Calender

    John,

    I need to play with it to fit it into the code already there. I just need to say thank you yet again. This is great. Better then what I expected. THANK YOU very much.

    Regards.
    Justin

  10. #10
    Registered User
    Join Date
    11-22-2010
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Hello Jaslake,

    Hope all is well. I have been able to integrate the code you have provided with my VBA code. It performs generally as it should. I have made some changes and are unware of why the code is not completely working.

    Right when I click on the "populate outlook" button, the user name box appears. I have changed the names within the box to read for the executives that we have here. Right now I have no assigned names in the boxes so any one who chooses their name should get all the upcoming events to populate their outlook. Regardless of who I choose, no updates are made in my outlook.

    I know that I have attached no code to this post, is there anything you can help me with to assure that the code works? What would you need to assist me?

    Thank you in advance for any time and assistance you can offer.

    Regards.

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Hi Justin

    I assume the code worked previously. So, when you say
    I have made some changes
    what changes did you make? Code changes?

    If you made code changes, I'd need to see the code. In the sample file, it matters not which name I select, the items get posted to my default calendar. If an event has no assigned name, that event also gets posted to my default calendar.

    Please post an updated workbook with your changes and I'll look at it. Can't really troubleshoot without it.

    John

  12. #12
    Registered User
    Join Date
    11-22-2010
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Populating data from an excel spreadsheet to Outlook Calender

    In regard to the code, I have changed the CommandButton#'s from 1 and 2 to 4 and 5 (respectively) Please see the code below:

    Please Login or Register  to view this content.

    I have also changed the names in the ShowUsers form to Madeline, Carol, Bob, Jen, Tiz. In this order.

    I get the ShowUsers Form to pop up but when I hit the update button, nothing happens.
    Thank you for all of your help.
    Last edited by jsgray; 12-09-2010 at 03:28 PM.

  13. #13
    Registered User
    Join Date
    11-22-2010
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Hello Jaslake,

    I have found out why the update button does not work. It now works, but I am getting another error. I am currently debugging it. Please do not waste any more of your time as I feel I can figure this one out. If I have any further questions, I will contact you at that time. I apologize for any inconvenience I may have caused. Please accept my apologies. Thank you for all of your time and assistance.

    Grateful and Appreciative,
    Justin

  14. #14
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Hi Justin

    Anytime. Stepping through the code almost always works.

    John

  15. #15
    Registered User
    Join Date
    11-03-2020
    Location
    california
    MS-Off Ver
    2013
    Posts
    1

    Re: Populating data from an excel spreadsheet to Outlook Calender

    I would really appreciate if I can get a copy of that excel sheet ... trying to download and it is corrupted I need it for outlook office 2013

  16. #16
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Populating data from an excel spreadsheet to Outlook Calender

    Quote Originally Posted by jerryleigh View Post
    I would really appreciate if I can get a copy of that excel sheet ... trying to download and it is corrupted I need it for outlook office 2013
    If you are talking about the attachment from post #8, I had no problem downloading it.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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