How to create Outlook archive using VB or command line to automate the solution

Nitin Rohitgi
Nitin Rohitgi used Ask the Experts™
on
I want to automate this process via Command or any other tool
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
System Analyst
Commented:
you don't need a script. there is a feature in outlook which will does for you

Click the File tab, and then click the Options tab on the File menu.
Click the Advanced tab.
Click AutoArchive Settings.
Click to select the AutoArchive Every check box, and then type a number in the Days box to specify how frequently the AutoArchive process runs.
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018
Commented:
Archiving is already automatic and I am fairly sure there is no Outlook Command line Switch to Archive.

https://social.technet.microsoft.com/wiki/contents/articles/7271.outlook-2010-executable-switches.aspx

Set up archiving as described in the above post.

Now (in Outlook) check the properties of every folder. Go to the Archive tab and make sure Auto Archive is enabled for each folder. This is an important step.
Shaun VermaakSenior Consultant
Awarded 2017
Distinguished Expert 2018
Commented:
If you need to do this company-wide and you have Active Directory, you can do this via GPO with setting for Autoarchive
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Shaun VermaakSenior Consultant
Awarded 2017
Distinguished Expert 2018

Commented:
My solution of doing it via GPO or resulting Registry setting is also a valid solution. In fact, it is the only one that can be automated and can be done via command line as per OP's requirements
reg add HKCU\SOFTWARE\Microsoft\Office\16.0\Outlook\Preferences /v ArchiveOld /t REG_DWORD /d 1

Open in new window

archive.jpg
Alexei KuznetsovMicrosoft Outlook MVP

Commented:
@Shaun, this is not the solution. Nitin clearly asks for the command line/VB script to automate the backup procedure (aka Archiving).
Shaun VermaakSenior Consultant
Awarded 2017
Distinguished Expert 2018

Commented:
How to create Outlook archive using VB or command line to automate the solution
I want to automate this process via Command or any other tool
No, automate the creation of Outlook archiving, not trigger the process. Even if that is so, what makes the other answers more correct, mine does the exact same setting as other two just automated?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial