Solved

Backing Up Contact Details in Outlook 98

Posted on 2001-06-20
18
264 Views
Last Modified: 2010-04-08
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
Comment
Question by:Jamesbloke
  • 6
  • 5
  • 3
  • +2
18 Comments
 
LVL 8

Expert Comment

by:starl
ID: 6210986
_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
 
LVL 9

Expert Comment

by:rjcpjc
ID: 6211129
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
 
LVL 8

Expert Comment

by:starl
ID: 6211421
rj - but the code work in 98? that's what's needed...
0
 
LVL 9

Expert Comment

by:rjcpjc
ID: 6211437
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
 
LVL 8

Expert Comment

by:starl
ID: 6211584
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
 
LVL 9

Expert Comment

by:rjcpjc
ID: 6211614
Exactly.  Not at all automatic.
0
 
LVL 8

Expert Comment

by:starl
ID: 6211862
guess we have to see what james wants...
0
 
LVL 21

Expert Comment

by:traval
ID: 6212510
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
 

Author Comment

by:Jamesbloke
ID: 6213322
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:Jamesbloke
ID: 6213330
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
 
LVL 8

Expert Comment

by:starl
ID: 6214196
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
 
LVL 21

Expert Comment

by:traval
ID: 6216312
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
 
LVL 9

Expert Comment

by:rjcpjc
ID: 6216323
James, would you still like code or can you go with the other option (which would be simpler and easier to implement).  
0
 
LVL 21

Expert Comment

by:traval
ID: 6216518
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
 

Author Comment

by:Jamesbloke
ID: 6259043
Yes, the chore is pointless - our company specializes in this field........


Please can I have the VBA code?
0
 

Expert Comment

by:PandoraMod
ID: 6357967
ping rj - code?

PandoraMod
Moderator @ Experts Exchange
e-mail: pandoramod@experts-exchange.com
0
 
LVL 9

Expert Comment

by:rjcpjc
ID: 6359775
Thanks Pan.  

James, VBA Code coming up!
0
 
LVL 9

Accepted Solution

by:
rjcpjc earned 100 total points
ID: 6360505
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now