Hi, I am totally new to Outlook VBA but I am familiar with VBA. I have a project that I would appreciate your help for. On a weekly basis I receive a text email that contains the name of people and their schedule for the week which also include special projects. It has a defined format, so it would be just a matter of browsing each line looking for matches and get the appropriate information. I can do that. :) What I dont know is how to add a macro button to outlook. I need to be able to run the macro when I open the email. (I dont want the macro to run automatically) How can I access the body of the email within VBA and treat it as a text file? How can I create a calendar invite and have it automatically sent to the individual (i can either hardcode the email or maybe have outlook automatically search for the email on the contacts list based on the format last name, First name) With this I can start working something. Thanks for all the help.
item.Body is the plain text string of the mail item. Code run from an open item would use Application.ActiveInspector.CurrentItem to get the current item. For a button in an Inspector in Outlook 2003 or earlier right-click on a toolbar or menu bar and select Customize. The Commands tab lets you select Macros, which you can then rename when they are added to a toolbar or menu. A macro must be a Public Sub with no calling arguments. Look at the Object Browser Help on AppointmentItem.MeetingStatus, there's VBA code that shows how to set up appointments as meetings. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm wrote in message news:e3058acf-b19b-4b62-9fae-2a6e518759ce@x30g2000hsd.googlegroups.com... > Hi, > > I am totally new to Outlook VBA but I am familiar with VBA. > > I have a project that I would appreciate your help for. > > On a weekly basis I receive a text email that contains the name of > people and their schedule for the week which also include special > projects. > It has a defined format, so it would be just a matter of browsing each > line looking for matches and get the appropriate information. > I can do that. :) > What I dont know is how to add a macro button to outlook. > I need to be able to run the macro when I open the email. (I dont want > the macro to run automatically) > How can I access the body of the email within VBA and treat it as a > text file? > How can I create a calendar invite and have it automatically sent to > the individual (i can either hardcode the email or maybe have outlook > automatically search for the email on the contacts list based on the > format last name, First name) > > With this I can start working something. > Thanks for all the help. >