Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Contacts 1

Status
Not open for further replies.

edvedafi

Programmer
May 17, 2003
24
0
0
US
I have a csv file with a list of names and email addresses (last,first,email) that I would like to create a VBScript to import into Outlook 2003 as a new contacts folder. I am distributing this to many users and the csv will be updated and sent out through email on a regular basis, so I would rather not use the Import Wizard. What I have come up with so far is below. It looks incomplete to me, but I am new to VBScripting so I am not sure what I am missing.

----------
Set objOutlook = CreateObject("Outlook.Application")
Set nms = objOutlook.GetNamespace("MAPI")
Set fld = nms.Folders("Personal Folders").Folders("JobCenter")
Set itms = fld.Items

strServer = "labsrv01"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile ("G:\contacts.csv", 1)

Do Until objTextFile.AtEndOfStream
strLine = objTextFile.Readline
tokens = Split(strLine, ",")
Set itm = itms.Add("IPM.Contact.FolderName")
itm.LastName = tokens(0)
itm.FirstName = tokens(1)
imt.EmailAddress = tokens(2)

Loop

--------
Thanks in advance, any help would be appreciated
 
Have you considered creating these contacts in a public folder instead? That way each of your users will all have the same info without having to constantly update from CD.

I hope you find this post helpful.

Regards,

Mark
 
I wish I could, but I am working with an group of 14 different organizations in one building, and they do not want any of the 14 servers to have contact with each other.

If there is some way of creating a public folder that can be accessed outside of the network that would probably be the best option, but I could not find any way of doing that.

If there is any other way I can do this I am definitly open to suggestions.

Jason
 
You can publish a public folder so it is available via the Internet. Do you have Standard or Enterprise Exchange?

I hope you find this post helpful.

Regards,

Mark
 
It is Exchange 2000, I believe it is the enterprise version, but I cannot get to the server until later tonight, is there any why I can check remotely.

Jason
 
I check on it and it is Exchange 2000 Enterprise Edition. I found some documentation on the MS website so I am going to read that over this weekend. I am actually a programmer/trainer, but since I am the only one in the building with any IT background this got thrown on me. If any knows of any good free resources other than the MS website that would have some info on how to set up and maintain an exchange server I would appreciate the info.

Thanks
Jason
 
Jason,

Since you have enterprise, I would recommend that you create a second Public Folder database and publish that one. That way you can keep your regular store separate.



I hope you find this post helpful.

Regards,

Mark
 
I have gotten the public folder set up, but I am having troubles with finding any info about how to publish it. Everyone within the organization can see it fine. But I need to have people outside of the organization be able to see it.

Thanks,
Jason
 
First verify you can see it via a web page.
If you can then you just need to allow access to the folder using IIS, DNS and of course route the needed IP to the server.

I hope you find this post helpful.

Regards,

Mark
 
This project got put aside for a little while, but now I am going to try this again.

I have the site up, but what shows up is a list of .eml files which open in OE(They will not open in Outlook) and show no useful information. In the public folders on the network they are showing correctly, however they do not work on the website. Is there any way to tell Outook to use this a contact list?

thanks
Jason
 
I am confused as to what is now happening.
Please provide some confirmation for me on the following:
The public folder was created with the property to hold contacts?
You have successfully created contacts in a public folder?
The public folder can be accessed OK from Outlook?
The contacts work within Outlook?
The public folder can be accessed from a web page?
The contacts do NOT work from the web page?

I hope you find this post helpful.

Regards,

Mark
 
The public folder was created, holds contacts and can be accessed perfectly from inside Outlook.

On the web page all I see is a list of .eml files that can be downloaded. When you click on one of these links it downloads Jason.eml. When you try to open Jason.eml it opens in Outlook Express, and looks as if OE thinks it is a blank email message sent from Jason.

Do I need to write a website that uses ASP to read the contacts information, or does IIS interpert the information out of a public folder correctly.

Hope this clears up what is going on. If not ask again and I will try to clear it up some more.

Thanks
Jason

 
I'll have to try and duplicate this for you so I can see if I get the same results.

I hope you find this post helpful.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top