Link to home
Start Free TrialLog in
Avatar of BITASCII
BITASCIIFlag for United States of America

asked on

Outlook Appointment export to CSV/Excel, including appointment item body text

Outlook 2010's export to file wizard (File|Options|Advanced|Export...) doesn't refernce appointment item body, would anyone have a VBA solution to export Outlook apppointment items from a shared calendar to CSV or Excel file, including appointment item body as string?  

To limit file size, only appointments who'se body text contains the string: "Catering: " need to be exported.  The shared Calendar is named "C3 Conference Center Calendar” in folder view. To be useful, the CSV file would include key fields from the appoitnment item, for example:  StartDate&Time (AppointmentItem.Start), EndDate&Time (AppointmentItem.End), Alldayevent (AppointmentItem.AllDayEvent), BillingInformation (AppointmentItem.BillingInformation), Categories (AppointmentItem.Categories), Description/Subject (AppointmentItem.Subject), Location(AppointmentItem.Location) + body as string.

We tried outlook's export wizard,  File | Options | Advanced | Export... but that does not reference the appointment item body.  Appreciate any help. Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BITASCII

ASKER

Chris, Spot on: wee folder path tweak needed - as you have predicted! The calendar is (unfortunately) not shared using Public Folders.

In Immediate Window ?Application.ActiveExplorer.CurrentFolder.FolderPath resolves to "\\C3 Conference Center \Calendar".  The "C3 Conference Center" appears to be an outlook account with its own default folders -- our  group apparently has full rights to that account's Calendar.  Using our Calendar View we can see, select and edit that account's Calendar.

What is the recommended method for setting the fldr object to return \\C3 Conference Center \Calendar, please?  I am looking into the Application.GetNamespace Method but this is unfamiliar territory and no success so far.  
Works for calendar shared using Public Folders.
For calendars shared using delegate rights, modify Chris's solution above with the GetSahredDefaultFolder method of Outllook Namespace, see http://msdn.microsoft.com/en-us/library/aa220116(office.11).aspx