Scenario:
I want to automate a process to:
a) export my Outlook 'calender' to a .pst file,
then I plan to take that file to another PC, and
b) import it (no duplicates) into the other PC's Outlook (calender).
Can someone please kick this off with a snippet to export the 'calender' to .pst file?
I had seen some of your similar posts, but couldn't find much on Calendar.
For what its worth, the above does return all Calendar events (VBA, and in VB)
I could, if required, extract this into a textfile, then reload as required (using the appropriate fields).
Almost have it finished. I am approaching it from a different point
of view. This is going to be fast and good! I think I will use this
myself too. Couple of minutes more. Had to help my daughter
with something.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Ultimately, its a method of 'syncronising' two different Outlooks without the need of a PocketPc or the like. I thought I'd start off with the Calendar, then maybe the Addressbook (seems to be alot about that).
No not too late. What version of Outlook do you run?
I tested and wrote it on 2003 and no problems. I am currently
uploading and testing on my system at work which has 2000.
Then I will post in a couple of minutes.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
I off home in a tick, will check when I get home. I will also test when I get back to work on Monday. Many thanks.
If I dont catch you online tonight; have a great weekend.
I'm sure it will be helpful, as you know other have asked and there has been no decent response.
For the benifit of others, there is a method that you can do manually thru Outlook, but how handy would it be to have it done automatically.
The manual method would sort of be like this:
You would export the calander/addressbook as a .pst file (taking time to make the appropriate selections),
then once you have this file, you can import it back into Outlook,
manually making/selecting appropriate selection (ie where to copy it, don't copy duplicates etc). Although pretty much simple, it takes a few mouse clicks and dialog boxes to achieve.
So, it would be handy to have some (VB/VBA) code to achieve this automatically.
In my case I will set up my friends PC at work with a button to envoke a macro that will perform the export. Then, with the file now on on a pen drive have a similar button that will envoke a macro to do the import of the file to his home PC - simple
Bruce, I am a little busy this morning at work to fit in time to finish
the program, but it is working fine for Outlook 2000 SR-1 running
on Windows 2000 Terminal Server. I will have more time tonight
at home.
BTW, my program is very similar to the manual method.
I will pm you on something else.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Bruce, I am back. Here is main part of the solution.
First, need to add a new pst file with a date/time filename stamp
using the .AddStoreEx method from the Namespace object for
2003 else use the .AddStore for 2002 and below with a version
trap for unsupported version of Outlook.
Then, use the .GetLast method to set a MAPIFolder object equal
to the newly added pst file.
Then iterate through the folders you want to backup by re-
creating the objects in the pst folder.
I can email you my program as soon as I finish the last of the
help file if you want since you inspired me on this utility.
Ps: hows the weather down in Australia?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.