Outlook PST / OST compact

User avatar
ErikJan
BronzeLounger
Posts: 1242
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Outlook PST / OST compact

Post by ErikJan »

Is there code (not the one that simulates keypresses) that allows one to compact OST/PST files using VBA?

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Outlook PST / OST compact

Post by HansV »

You can compact folders to a new .pst file programmatically, but not in an open .pst file (without using SendKeys).
Best wishes,
Hans

User avatar
ErikJan
BronzeLounger
Posts: 1242
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Outlook PST / OST compact

Post by ErikJan »

OK, that matches what I could Google. Strange as manually it's possible.

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Outlook PST / OST compact

Post by HansV »

It's similar to the situation in Microsoft Access, where you can compact the active database in the interface, but in VBA you can only compact to a new database (except by using a trick that calls the interface command)
Best wishes,
Hans