• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

Backing Up Contact Details in Outlook 98

Is it possible to automatically export the contacts folder in Outlook to a .pst file. This has to be done client side and not server side.

This is using a Microsoft Exchange server with Outlook 98 on Windows 95 & 98 client PC's.


0
Jamesbloke
Asked:
Jamesbloke
  • 6
  • 5
  • 3
  • +2
1 Solution
 
starlCommented:
_automatically_?!
not within OL98 as it stands. You can export the entire folder, (File - Export) but that will have to be done manually. Someone _may_ have some code (rjpjc??? you around)
0
 
rjcpjcCommented:
starl is right about 98.  I believe it could be done with VBA code in Outlook 2000.  I'll see if I can hunt up some code that might work for 2000.  
0
 
starlCommented:
rj - but the code work in 98? that's what's needed...
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
rjcpjcCommented:
Nope.  VBA will only work in 2000.  The only other option I could think of would be to use VB to access the object model in 98.  

Or use VBA from another program (like Access) to access the object model in 98.  Either way the code would be similar.  I'll try to post at least a snippet today just for an example.
0
 
starlCommented:
that's what I was thinking - VB code, not VBA cause there is none for OL98, just a few scripts...

but a code wouldn't be very automatic...you'd have to start the code.. of course, it could be faster than going through the export wizard.
0
 
rjcpjcCommented:
Exactly.  Not at all automatic.
0
 
starlCommented:
guess we have to see what james wants...
0
 
travalCommented:
Are we talking about a person's individual contacts stored on a mailbox that need to be exported to a PST?  Or a Global Address List?

Reason I ask is that there is no necessity that an individuals contacts actually be stored on the mailbox.  You can create a PST file with just a contacts folder.  Create a "Contacts" shortcut on the Outlook bar pointing the the PST files contact folder after removing the shortcut pointing to the Mailbox's contact folder.

Make sure to right click the PST Contact folder->Properties->Outlook Address Book tab and check the "display this folder as an address book" option.

It is transparent to the user where the data is actually being stored at.  Only real drawback is that the contacts can't be accessed if you log on using another computer.

This way the contacts folder is already a PST file and you can write a batch file that just copies it to where ever automatically (assuming Outlook is closed at the time).
0
 
JamesblokeAuthor Commented:
Thanks for your efforts - you have confirmed what I thought. I was just checking I hadn't missed anything.

Please can you send me the VB/VBA code and I will send you the points.

I guess if it is a VB program, it could be put into the startup group and set to run at certain dates (provided it doesn't take up too many resources). Certainly a button or a shortcut to do the backup is within the users capabilities.

It also gives me ammo to upgrade the systems to 2000.
0
 
JamesblokeAuthor Commented:
Thanks for your efforts - you have confirmed what I thought. I was just checking I hadn't missed anything.

Please can you send me the VB/VBA code and I will send you the points.

I guess if it is a VB program, it could be put into the startup group and set to run at certain dates (provided it doesn't take up too many resources). Certainly a button or a shortcut to do the backup is within the users capabilities.

It also gives me ammo to upgrade the systems to 2000.
0
 
starlCommented:
traval - a little confusion on my part... referring only to OL98 - if you are already using a pst for your mail (not keeping it on the server), you can create ANOTHER  pst just for contacts????
0
 
travalCommented:
To starl:  Should work the same regardless of whether you are using the mailbox or a pst file as your delivery point.

1.  You need to make sure you are running the Outlook Address Book service.

2.  Add a new PST file under Tools->Services, and change name from Personal Folders to "Contact List" or something.  It will by default have only one subfolder, Deleted Items which will hold anything deleted in this PST file.

3.  Add a folder to the new PST file, calling it "My Contacts" or whatever, and set it to contain contact data.  

4.  Right click on the new "My Contacts" folder, choose OAB tab, and check to display as address book.

5.  Now open Tools->Address Book (or click on TO button in new message) and you should be able to choose "My Contacts" from the "Show Names from the" list.

6.  Under Tools->Services->Addressing Tab, set this new folder on the two menus if this is going to be your main contact repository.  You can also create a shortcut to it on the Outlook Bar.

That should do it.  You now have a PST file which contains only your contacts data, which may or may not meet the actual requirements.  Again, the shortcoming is if the user logs into multiple computers and needs to access the contact list from all of them, this is not the way to go.
0
 
rjcpjcCommented:
James, would you still like code or can you go with the other option (which would be simpler and easier to implement).  
0
 
travalCommented:
While the process I described above will work assuming it fits your needs, the more I think about this the more I think the whole process may be unnecessary.

What is the delivery point for the users?  

If it is the Exchange mailbox, the SysAdmin should be regularly backing up the information store, so the chore is pointless.

If the delivery point is the PST file on the local harddrive, it would be both simpler and more constructive to back up ALL outlook data by just backing up the whole PST file rather than just the contact list.  What is the size of the PST files you are dealing with?  If they are very large you should be archiving anyway to improve performance.

Are there reasons the above are not feasible?
0
 
JamesblokeAuthor Commented:
Yes, the chore is pointless - our company specializes in this field........


Please can I have the VBA code?
0
 
PandoraModCommented:
ping rj - code?

PandoraMod
Moderator @ Experts Exchange
e-mail: pandoramod@experts-exchange.com
0
 
rjcpjcCommented:
Thanks Pan.  

James, VBA Code coming up!
0
 
rjcpjcCommented:
This is for Outlook 2000.  Its not the cleanest code in the world, but it does work.  

Sub ExportContacts()

Dim olapp As Outlook.Application
Dim olns As Outlook.NameSpace
Dim olctfolder As Outlook.MAPIFolder
Dim olctitems As Outlook.Items
Dim olctitem As Outlook.ContactItem
Dim olpstfld As Outlook.MAPIFolder
Dim olpstctfld As Outlook.MAPIFolder
Dim mycopieditem As Outlook.ContactItem

Dim olobj As Object

Set olapp = CreateObject("Outlook.Application")
Set olns = olapp.GetNamespace("MAPI")

Set olctfolder = olns.GetDefaultFolder(olFolderContacts)

Set olctitems = olctfolder.Items

olns.AddStore ("C:\test.pst")

Set olpstfld = olns.PickFolder  'Have to have the user pick the newly created pst file

Set olpstctfld = olpstfld.Folders.Add("ContactsExport", olFolderContacts)

For i = 1 To olctitems.Count
    Set olctitem = olctitems.Item(i)
    Set mycopieditem = olctitem.Copy
    mycopieditem.Move olpstctfld
   
Next

Set mycopieditem = Nothing
Set olctitem = Nothing
Set olctitems = Nothing
Set olpstfld = Nothing
Set olpstctfld = Nothing
Set olctfolder = Nothing
Set olns = Nothing
Set olapp = Nothing




End Sub
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 6
  • 5
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now