need script to export .pst

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 16 years and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
ruskimisha
Posts: 7
Last visit: Mon Mar 24, 2008 2:58 am

need script to export .pst

Post by ruskimisha »

Hello everyone

I have 0-10% knowledge of script i can read it and understand it but i can not write it at all..

I need a script to export a mailbox to a .pst in outlook 2003, instead of doing it by file>export>.pstThere will be multiple machines where i need to export the mailbox's. This is a NON EXCHANGE ENVIRONMENT. i tired outlookcodes.com and some other websites but i found how to copy pst to pst. Nothing what i need, any help will be greatly appreciated.

ThanksMike.
User avatar
ruskimisha
Posts: 7
Last visit: Mon Mar 24, 2008 2:58 am

need script to export .pst

Post by ruskimisha »

wat about using a vba macro? can i run that file form a desktop??
User avatar
donj
Posts: 416
Last visit: Thu May 29, 2008 5:08 am

need script to export .pst

Post by donj »

Typically not - Outlook's macro security, by default, is set pretty high because macros have been used as viruses in the past. After changing the security, yes, you could.

Actually, Outlook's security is one of the bigger problems :).

Let me ask - is it acceptable to have the user open Outlook and then run a VBS that automates the menu selections necessary to do an export? You could use VBScript's SendKeys method to send keystrokes to Outlook to automate an export using the GUI...

There's a SendKeys example in the Essentials blog (in the Sharing Zone), if you want to take a look.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

need script to export .pst

Post by jvierra »

No. To copy it you only need to copy it.

A full export of a PST toa PST is exactly the same as copying the file using the command line copy command.

Are you talking about exporting an Exchange mailbox? This is not a PST and has to be handled in a different way. From your post I am assuming you are talking about exporting the contents of one PST to another.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

need script to export .pst

Post by jvierra »

Are you on Exchange? Is it an Exchange mailbox that you want to export?

If so you can do it at the server using MS utilities. It's much easier. You can export every maibox to it's own PST with one command.

jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

need script to export .pst

Post by jvierra »

Then you can just copy the PST. It is exactly the same as an export. Just copy it before opening Outlook.


jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

need script to export .pst

Post by jvierra »

The PST is the file Outlook uses for it's mail. It may have an OST extension under some circumstances. It is located in the users "Application Data" folder by default.
I have been scripting Outlook for nearly ten years. THe is no "export" command in Outlook. The Import/Export menu item is not available to scripts. It is an internal synthetic process that the user can enlist to save mail items. It was never intended that it be used for backup or other things.

Microsoft has an Outlook backup utility on the Office site that can be added to Outlook for free. This can be scheduled to export teh Outlook mail.

There are numerous third party tools that can be used to export Putlook data but all have to be installed on the client so it is not convenient.

Microsoft has done a very good job of preventing external access to Outlook but you can still open an Outlook POST file using VSTO and Visual Studio but NOT with script. It can be done with script using third party add-ons but all need to be installed on each and every client to work.

The contents of Outlook can be queried with ADO and copied to other formats using the Outlook ADO object but it may not be installed. I believe it is only installed with Office Pro.

User avatar
ruskimisha
Posts: 7
Last visit: Mon Mar 24, 2008 2:58 am

need script to export .pst

Post by ruskimisha »

There is a script that exports the whole mailbox into txt files... how come instead of a txt files it can not be made into a PST?
User avatar
ruskimisha
Posts: 7
Last visit: Mon Mar 24, 2008 2:58 am

need script to export .pst

Post by ruskimisha »

Also i loooked under application data under the profile root and the local settings root both dont have no pst or an ost.

i do have a pst set at C:Program FilesCommon FilesSYSTEMMSMAPI1033outlook.pst

but that pst is liek 130kb... and i know my mailbox is atleast 500 mb.
User avatar
ruskimisha
Posts: 7
Last visit: Mon Mar 24, 2008 2:58 am

need script to export .pst

Post by ruskimisha »

i kno his a big macros user, anything can be done in macros?!
This topic is 16 years and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked