Closed Thread
Results 1 to 29 of 29

Macro to send multiple meeting requests using outlook from excel

  1. #1
    abhay_547
    Guest

    Macro to send multiple meeting requests using outlook from excel

    Hi All,

    I have got the below macro which loops through the rows in a sheet and schedules appointments in outlook in as per my requirement but I have following issues with the below macro.

    1) I want to know how I can also add the Label along with the .Body, Subject, Location etc.. Label is usually used to define colours for appointments for e.g. Important, Business, Personal etc.

    2) I want to know how I can insert / copy a long text with some URL/links in it and a data table on my appointment body. I have all data in a excel sheet in a name range. .i.e. "Mailbodytext". This range is quit big .i.e. from Cell A1:X55. It's properly formatted. I want to copy this range along with formatting without gridlines on my appointment body.

    Please Login or Register  to view this content.
    I have attached my macro file for your reference.

    Thanks a lot for your help in advance.
    Last edited by abhay_547; 10-06-2010 at 11:44 PM.

  2. #2
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi All,

    Did anyone get the chance to look at the above post.

    Thanks a lot for your help in advance.

  3. #3
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi All,

    Did anyone get the chance to look at the above post.

    Thanks a lot for your help in advance.

  4. #4
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    I've looked at your issue for many hours and haven't been able to sort it out. Haven't given up yet but doesn't look promising.

    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.

  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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    I've gotten it narrowed down to one problem (from my perspective). I'm posting a workbook that should/will demonstrate the problem. You'll have to click "OK" on this screen (See Click_OK_Button.jpg)

    I'm trying to fix this shortcoming. I'll let you know of my progress.

    Let me know of your issues.

    John
    Attached Images Attached Images
    Attached Files Attached Files

  6. #6
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi Jaslake,

    Thanks a lot for your reply. I tried to open the test4.xls file attached by you in the above post but whenever I am trying to open the same my system gets hanged. However as far as the paste special issue is concerned I tried to do some search for the same from my end as well and I have the below two links which may us in resolving the paste special issue. Please have a look.

    http://www.xtremevbtalk.com/archive/...p/t-73369.html

    http://www.rondebruin.nl/mail/folder3/row.htm

    http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx



    Thanks a lot for your help in advance

  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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    I don't know why your system won't open the file properly. I've tested it in both Excel 2000 and Excel 2007 and it opens fine. I've eliminated a Workbook Open Event in the attached workbook in the event it was causing a problem. The procedure I eliminated sets a reference to Microsoft Object Library in VBA. If you can open the workbook, you may need to set this reference manually in VBA->Tools->References. Although the reference should be set in the attached.

    I've been all over the links you provided (many times). They don't appear to be helpful. I'll continue to work on it.

    John
    Attached Files Attached Files

  8. #8
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi jaslake,

    Thanks a lot for your reply, I am now able to open the test4.1.xls file at my end but I would like to highlight one thing in the same .i.e. I have observed in the above file that in column F of sheet "scheduleapp" you have mentioned that the data for all appointments / meeting requests is copied from Sheet1 but I have the separate data for each appointment item which is there in different sheets. for e.g. Sheet1 has the data for 1st appointment/meeting request. Sheet2 has the data for second appointment/meeting request and so on.

    I didn't have any dummy data and that's why I had pasted the same data in all sheets.

    Thanks a lot for your help in advance.

  9. #9
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    The copy of your original workbook doesn't indicate such, however, that change can be incorporated. I'll need to know what will be in column F, Boby for each individual appointment. Will it be "This text should come from "Mailbodytext" range of Sheet X"? Will it be simply "Sheet 1", "Sheet2", etc? I need to know how to find which sheet goes with which appointment.

    John

  10. #10
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi jaslake,

    Thanks a lot for your reply, Below is the answer for your question.

    As of now the column F contains the text which you have mentioned in your post .i.e. "This text should come from "Mailbodytext" range of Sheet X" but if you want we can only mention the sheet name in Column F but then I would like to mention the name range in some other column .i.e. "Mailbodytext" .i.e. we can mention the name range in a separate column or as the name range is same in all sheets we can hardcode the same in our code.

    I have got the below links which I think will help in someway for constructing our code.

    http://www.vbforums.com/archive/index.php/t-581489.html

    http://www.vbaexpress.com/forum/showthread.php?t=22757

    http://www.outlookbanter.com/outlook...mailitems.html

    http://www.officekb.com/Uwe/Forum.as...xpress-message

    http://www.mrexcel.com/forum/showthread.php?t=338391

    Thanks a lot for your help in advance.
    Last edited by abhay_547; 10-12-2010 at 11:49 PM.

  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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    I'm attaching a file that resolves this issue
    Sheet1 has the data for 1st appointment/meeting request. Sheet2 has the data for second appointment/meeting request and so on.
    I'm still working on this issue
    I've gotten it narrowed down to one problem (from my perspective). I'm posting a workbook that should/will demonstrate the problem. You'll have to click "OK" on this screen (See Click_OK_Button.jpg)
    Haven't given up yet.

    John
    Attached Files Attached Files

  12. #12
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    I'm going to bed now but I wanted to post the attached. I believe we're getting closer.

    John
    Attached Files Attached Files

  13. #13
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    The attached version incorporates the feature to catagorize the appointment level of importance. I've assumed that's what you meant by this
    Please Login or Register  to view this content.
    If this is not what you meant, let me know.

    Let me know of issues.

    John
    Attached Files Attached Files

  14. #14
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi jaslake,

    Thanks a lot for your reply, The importance column which you have added to the file is to define the level of importance which is high or low but I am talking about the "Label" Field / Dropdown which reflects just next to Location field in a meeting request and which has following option relfecting in it's dropdown .i.e. Important, Business, Personal, Vacation etc.. I have attached a screenshot also for your reference.

    Just to give you an update I have found an alternate way to select the required label automatically using the outlook mail rules. .i.e. I have created some rules in outlook which says that if the subject line of a meeting request is this then color it important, if it is something else color it personal and this solution is working fine but may be we can find the some excel VBA code which will automatically do this. However I would suggest that as we have the above alternate solution for "Label" Issue. We can go ahead and concentrate on the Copy data to meeting request issue.

    I have observed that when I run the code from test7.1 file it gets stuck at below line.

    Please Login or Register  to view this content.
    Apart from this I am unable to find the "Click_OK_Button.jpg" attachment which you had mentioned in your earlier post.

    One more thing as we are sending a meeting invite and not scheduling just appointments in our calender. We will have to add the below code in our macro.

    Please Login or Register  to view this content.
    And apart from above Just to highlight I have selected the references to the below in the macro file.
    Microsoft Word 10.0 Object Library
    Microsoft Outlook 10.0 Object Library
    as I have MS Office XP 2002 installed on my system.


    Thanks a lot for your help in advance.
    Attached Images Attached Images
    Last edited by abhay_547; 10-13-2010 at 09:18 PM.

  15. #15
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    I'm using Outlook 2007 and this line of code executes properly
    Please Login or Register  to view this content.
    What Outlook version are you running? It may be a version problem but I have no idea at this point.

    I've Outlook 2000 on my old desktop. Tomorrow, I'll try running the code on the desktop and see if I have your problem.

    Today, I researched the "Label" issue and solved it on my machine by setting the rules in Outlook, just as you did. I've not yet found a means to do so through VBA, although, I'm certain such means probably exists.

    I'll continue to work on the issue. The immediate problem is
    Please Login or Register  to view this content.
    and getting this to run on your machine. It approaches a "complete" solution to your process.

    John

    Ha...as I was working on this post and talking on the phone with my daughter, I see that you've edited your last post. Let me review your entire post and I'll get back to you.
    Last edited by jaslake; 10-13-2010 at 09:46 PM.

  16. #16
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi Jaslake,

    I am using Outlook 2002 on my system. It doesn't seem to be a version problem because it gets stuck on the below code line and then shows following error message.

    Code line :
    Please Login or Register  to view this content.
    Error :
    Run time error '91':
    Object Variable or With Block Variable not set


    Thanks a lot for your help in advance.
    Last edited by abhay_547; 10-13-2010 at 09:56 PM.

  17. #17
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    Regarding this
    One more thing as we are sending a meeting invite and not scheduling just appointments in our calender. We will have to add the below code in our macro.
    Please Login or Register  to view this content.
    Please post a copy of your updated workbook with code. I wish to make sure we're not working at cross purposes; that I'm not creating fields where your's already exist.

    John

  18. #18
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi Jaslake,

    Please find the updated macro workbook.

    Thanks a lot for your help in advance.
    Attached Files Attached Files

  19. #19
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi Jaslake,

    Any updates...?

    Thanks a lot for your help in advance.

  20. #20
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    Nothing yet. I get
    Error :
    Run time error '91':
    Object Variable or With Block Variable not set
    on my Outlook 2000 machine. The error appears to be caused by this line of code
    Please Login or Register  to view this content.
    as it evaluated to "Nothing".

    I'll continue to work with it.

    John

  21. #21
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    Well, I did find this (emphasis added)
    In earlier versions of Outlook, the WordEditor was available only for messages and posts and only if the user had configured Word as the email editor. Since Word is the only editor in Outlook 2007 (except for NoteItem and DistListItem objects), it is available not just for messages and posts, but also for appointments, contacts, tasks, and journal entries. It even works if only Outlook 2007 is installed, and not Word 2007.
    Still searching.

    John

  22. #22
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi John,

    Thanks a lot for your reply, Finally I got the below link which I think will definitely resolve our issue. I have tested the code and it copies the the text from the excel sheet to outlook mail body with all formatting properly. But I need your help to incorporate the same in our multiple meeting request sending macro. Below is the link

    http://www.mrexcel.com/forum/showthread.php?t=8086


    Thanks a lot for your help in advance.

  23. #23
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    I'll look at this today.

    John

  24. #24
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    Well, I've spent two days trying to sort this out and have come up empty. We've got two issues working here.

    1. The first issue is a compatibility issue:

    The code I've provided was written in Excel 2000 with Outlook 2007. Your file Test7.2.xls runs just as expected in Excel 2000 with Outlook 2007; it also runs just as expected in Excel 2007 with Outlook 2007. It will not run in Excel 2000 with Outlook 2000.

    It's this code that Outlook 2000 doesn't like
    Please Login or Register  to view this content.
    I've been all over the Web to see if I can convert these lines to work in Outlook 2000 (or 2003) and have found nothing that I can make work. In my research I've seen repeated references to a COM addin called Redemption. I've downloaded Redemption but haven't made any sense of it in terms of how it helps in this situation.

    2. The second issue deals with available properties.

    Your reference http://www.mrexcel.com/forum/showthread.php?t=8086 while appearing to be promising, doesn't solve the issue. It relies on the HTMLBody property and that simply doesn't exist for an Outlook Appointment Item. That's why I've taken the "Paste" approach in the code I've provided..."Paste" works...I just can't seem to get it to work in Outlook 2000.

    I really don't know where to go next (unless your boss will invest in Outlook 2007 )

    The best I can suggest at this point is for you to convince yourself that this does indeed perform with Outlook 2007. Then, either upgrade or ask one of the true Gurus on this site to help you convert the code so it runs in Outlook 2003.

    Truly sorry we couldn't solve this.

    John

  25. #25
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi John,

    Thanks a lot for your help. I think we can try the below code which uses dataobject method

    Please Login or Register  to view this content.

    Thanks a lot for your help in advance.

  26. #26
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    Well, I've never used the DataObject method before so you've shown me a new approach. The method doesn't provide all the formatting you desired and not all the links come across. But it does work with Outlook 2000.

    You'll need to set a reference to Microsoft Forms 2.0 Object Library.

    Try the attached and let me know of issues.

    John
    Attached Files Attached Files
    Last edited by jaslake; 10-16-2010 at 04:19 PM.

  27. #27
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi John,

    Thanks a lot for your reply, It works great now but still the only thing which is not working as per my requirement is the data table which doesn't get pasted with it's format. Is there any way to get the formatting to the same ?. Can we use the Rich Text format or Bitmap to paste only the data table ?. Please help..


    Thanks a lot for your help in advance.

  28. #28
    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: Macro to send multiple meeting requests using outlook from excel

    Hi abhay_547

    I can resolve all issues using Outlook 2007. I can't resolve all issues using Outlook 2000. I don't have Outlook 2002 (your version). The unresolved issues are compatibility issues and I haven't been successful in resolving them.

    John

  29. #29
    abhay_547
    Guest

    Re: Macro to send multiple meeting requests using outlook from excel

    Hi All,

    Did anyone get the chance to look at the above post ?.


    Thanks a lot for your help in advance.

Closed 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