Page 1 of 1 1
Topic Options
#91881 - 2003-04-01 07:10 PM creating / editing outlook contacts from an Excel file
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I'd like to find a way to create contacts in a specified folder from data in a XLS or CSV.

with the possible ability to be able to update an existing contact with the given data in the table
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#91882 - 2003-04-01 07:27 PM Re: creating / editing outlook contacts from an Excel file
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I found this...

http://support.microsoft.com/?kbid=220595

http://www.microeye.com/images/OL2Kmap.gif

[ 01. April 2003, 19:39: Message edited by: Radimus ]
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#91883 - 2003-04-01 08:08 PM Re: creating / editing outlook contacts from an Excel file
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
this makes a contact in the default contacts folder:

code:
$olApp = CreateObject("Outlook.Application")
$olItem = $olApp.CreateItem(2)

$olItem.FullName = "James Smith"
$olItem.Birthday = "9/15/1975"
$olItem.CompanyName = "Microsoft"
$olItem.HomeTelephoneNumber = "704-555-8888"
$olItem.Email1Address = "someone@@microsoft.com"
$olItem.JobTitle = "Developer"
$olItem.HomeAddress = "111 Main St." +@crlf+ "Charlotte, NC 28226"

$olItem.Save

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#91884 - 2003-04-01 08:44 PM Re: creating / editing outlook contacts from an Excel file
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
ok... This will create into a public folder

code:
$olApp 		= CreateObject("Outlook.Application")
$NameSpace = $olApp.GetNameSpace("MAPI")
$Folder = $NameSpace.Folders("Public Folders").Folders("All Public Folders").Folders("Area 06").Folders("Area06 Staff")

$olItem = $folder.items.add

$olItem.FullName = "James Smith"
$olItem.Birthday = "9/15/1975"
$olItem.CompanyName = "Microsoft"
$olItem.HomeTelephoneNumber = "704-555-8888"
$olItem.Email1Address = "someone@@microsoft.com"
$olItem.JobTitle = "Developer"
$olItem.HomeAddress = "111 Main St." +@crlf+ "Charlotte, NC 28226"

$olItem.Save



[ 01. April 2003, 20:45: Message edited by: Radimus ]
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 657 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.11 seconds in which 0.084 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org