Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > AddressBook to Outlook Script - How does it work?

AddressBook to Outlook Script - How does it work?
Thread Tools
kcmac
Mac Elite
Join Date: Jan 2001
Location: Kansas City, Mo
Status: Offline
Reply With Quote
Oct 18, 2004, 05:37 PM
 
Trying to add my contacts into my soon to be PC at work.

I found this script on MacScripter that appears to convert all of your contacts at once into vcards. (Try this with AddressBook and it will make all of them into one vcf file which Outlook will not read. The Script is called "Export_AddressBook_as_vcards.scpt".

However, I can't get it to work. Here is the script.

tell application "Address Book"
set PathName to "Disk:Folder:Subfolder:" -- "Powerbook:Users:myusernameesktop:vcards to export:" --
set npersons to count of people
repeat with i from 1 to npersons
set vcardinfo to (vcard of person i) as text
set personName to (name of person i) as text
set target_file to PathName & personName & ".vcf" as text
try
set the open_target_file to �
open for access file target_file with write permission
set eof of the open_target_file to 0
write vcardinfo to the open_target_file starting at eof
close access the open_target_file
on error theErrMsg number theErrNumber
return theErrNumber
end try
end repeat
end tell

The set path name to Disk line is the key. I added my destination file where it said to add it. I put this script in my script folder within AddressBook.

Ideas?

Maybe you even know of a better way to export my Addressbook contacts into Outlook.
     
kcmac  (op)
Mac Elite
Join Date: Jan 2001
Location: Kansas City, Mo
Status: Offline
Reply With Quote
Oct 18, 2004, 06:49 PM
 
Ok. I posted a little too fast. Figured it out. Soon as I deleted Disk:Folder:Subfolder: everything worked fine.

Only thing about the script is you can only do your entire addressbook. Can't just do the ones you select.

Now I am trying to figure out how to get Outlook to import this whole folder full of vcf files. It still will only import one at a time. With over 1400 contacts, that is some slow stuff.

If you want to try it for yourself here it is.

http://scriptbuilders.net/category.php?id=1700
( Last edited by kcmac; Oct 18, 2004 at 06:58 PM. )
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:55 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,