Outlook calendar export macro

  • Thread starter Thread starter p
  • Start date Start date
P

p

Hi,

I'm fairly experienced writing Excel VBA but don't really know where
to start with Outlook.

What I'd like to do is write a macro which does one simple job -
exports my calendar to a PST file. Ideally, I'd like to be able to
choose a date range (so that old appointments don't get copied) and
look for keyword in the title (for example I might not want to copy
appointments marked "private").

Can anyone suggest the appropriate code? There's a wizard (File -
Import/Export) which does exactly what I need but I can't record it as
a module (in order to edit it).

The flipside is that I will also need an import macro soon, but that's
of secondary concern at the moment.

Many thanks,
Paul
 
With Namespace.AddStore you can add a PST file. You can use the InputBox
function to enter the date range. With the GetDefaultFolder function you can
get the default calendar. Its Items property has a Restriction function,
which you may use to get only the items you're looking for. And every item
has a Copy function.

For every mentioned function you may find samples in the VBA help file.

--
Best regards
Michael Bauer - MVP Outlook

: VBOffice Reporter for Data Analysis & Reporting
: Outlook Categories? Category Manager Is Your Tool
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Mon, 4 Aug 2008 08:14:45 -0700 (PDT) schrieb p:
 
Back
Top