Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Question:

Question: vCard import group

I am not able to find any spec that works with the Apple Address Book that allows the imported card to land in particular groups.

Anyone know a spec line you can put in your vCard format to auto import into groups?

Black MacBook4,1, Mac OS X (10.5.4), TVs(2)

Posted on

Reply
Question marked as Helpful

Aug 31, 2008 7:04 PM in response to user1724 In response to user1724

user1724,

OK, I've done some testing, and you are correct, but only to a point. Address Book will not import groups; no way, no how. It won't even import groups exported from itself as such. If you haven't followed my previous instructions to get a peek at Address Book's own formatting of Group Vcards, here is an example:


<pre style="overflow:auto; font-family: 'Monaco'; font-size: 10px">BEGIN:VCARD
VERSION:3.0
N:Doe;Sam;;;
FN:Sam Doe
EMAIL;type=INTERNET;type=HOME;type=pref:sl_Doe56@yahoo.com
EMAIL;type=INTERNET;type=HOME:fraggle_stone73@hotmail.com
TEL;type=CELL;type=pref:4407737264919
item1.ADR;type=HOME;type=pref:;;13 Ascott Road;Aylesbury;Buckinghamshire;HP21 2HX;England
item1.X-ABADR:us
CATEGORIES:Rat Pack
X-ABUID:99F85D1A-6C84-44B7-B0E4-FEB92351AC30\:ABPerson
END:VCARD</pre>


Notice the "CATEGORIES:Rat Pack" part. There's your implementation, and everything you need should be there. Of course, what I have posted here is just one contact that is included in a "group Vcard." The other included contacts all appear just like this, and the delimiters are "BEGIN:VCARD" and "END:VCARD."

However, that "CATEGORIES" part is apparently ignored by Address Book when the card is imported. The contacts come in fine, but group placement becomes the domain of that particular Address Book user. I can see some logic to this, as your "run of the mill" user won't want the importation of a Vcard to unilaterally place groups into their Address Book (one would end up with all sorts of irrelevant groups just by importing contacts one at a time). In other words, Address Book isn't supposed to import groups, and we probably wouldn't want it to.

All this said, you can import group Vcards, and have them grouped properly! The trick is that you'll need to create those groups in Address Book first:

1) Create a new group. Select it (it should be blank, so you'll see no contacts).

2) Drag your group Vcard into the window.

Yeah, it's that easy.

Scott

There’s more to the conversation

Read all replies

Page content loaded

Aug 30, 2008 8:31 PM in response to user1724 In response to user1724

user1724 wrote:
I am not able to find any spec that works with the Apple Address Book that allows the imported card to land in particular groups.

Anyone know a spec line you can put in your vCard format to auto import into groups?

there is no such field and there can not possibly be one. group membership is not recorded on a vcard of a person. you have to add a person to a group inside Address Book.

Aug 30, 2008 8:31 PM

Reply Helpful

Aug 30, 2008 9:10 PM in response to user1724 In response to user1724

user1724,

(continuing from where V.K. left off) BUT, I'd bet money that if you dragged the Vcard from the Finder, into a specific group in the Address Book window, that contact would end up in your Address Book and the desired group.

Scott

EDIT: In fact, I just checked, and I win the money!

Aug 30, 2008 9:10 PM

Reply Helpful

Aug 30, 2008 9:46 PM in response to V.K. In response to V.K.

V.K.,

Wanna know what's nifty? OK, open Text Edit. Start typing email addresses; for purposes of demonstration, just make up a bunch of nonsense email addresses, but formatted properly (whosit@anywhere.com). Here's the catch: Type them with no spaces, but separated by by commas (whosit@anywhere.com,jane@doe.net,etc.@blah.org).

When you think you have typed enough, select all the text, then drag it out to your Desktop.

Now, I'm sure you're aware of how we can drag any text out of just about any application to get "text clippings." As it turns out, Leopard's Finder combines this tech with the newer "data detectors," and Voila!!, we get instant email lists!

Try it out. Once you have dragged that clipping out of Text Edit, quit it (don't bother saving the document, just the clipping). Instead of a normal clipping, it becomes a "Mailto" file (with a ".mailoc" extension). Double click it. Pick up your jaw, and close your mouth, V.K.

Scott

Aug 30, 2008 9:46 PM

Reply Helpful

Aug 30, 2008 11:00 PM in response to V.K. In response to V.K.

I think the actual vCard spec has a categories entry so that on import the app can look at that and place it in the right groups (categories). That is the only way you could successfully transfer an address book with groups. But it seems Apple has chosen not to implement this. I was hoping they just picked some other non-standard approach. To not be able to preserve the groupings when importing 100s of cards with many groups per card . . . not good.

Aug 30, 2008 11:00 PM

Reply Helpful

Aug 30, 2008 10:57 PM in response to user1724 In response to user1724

In case others wander in with the same problem, here is my current workaround.

I put all my groupings for that card in another field. Then I use smart groups to search that field for the group names. This works, except you have a "junk" field on your card that now has hard-coded groups. Not a great solution. But at least you can import that way and be right up and running.

Aug 30, 2008 10:57 PM

Reply Helpful

Aug 30, 2008 11:04 PM in response to user1724 In response to user1724

that's a neat trick. you are right about the categories entry in vcards - I was wrong about that. Apple does use it actually. if you select an address book entry belonging to a group and drag it to the desktop, this will create a standard vcard. if you open it in any text editor, you'll see the the categories field with the name of the group in question listed. However the way address book keeps data to add card to a group you have to modify the vcard for the group, not the vcard of the group member.

Aug 30, 2008 11:04 PM

Reply Helpful

Aug 30, 2008 11:13 PM in response to user1724 In response to user1724

user1724,

Address Book does use the "categories" entry. I'm not sure your Vcards are formatted properly, though. The Vcard standard is just regular XML, with certain conventions in place.

It might help if we knew where these Vcards came from. You may even be able to figure out where the problem lies yourself, using Text Edit. Create just a few contacts (or use ones you have already) in Address Book, place them into a small group, then control-click on that group for the "Export Group Vcard..." option. Save the group Vcard to your Desktop.

Open the Vcard in Text Edit, and study the formatting. Now, do the same with one of the Vcards you are attempting to import.

Scott

Aug 30, 2008 11:13 PM

Reply Helpful

Aug 31, 2008 5:43 PM in response to Scott Radloff In response to Scott Radloff

I am programming the vCards, so I can code what ever I want.

I just cannot find any spec that Address Book accepts. So my question is the same as my first post. Does anyone know a category/groups format that Address Book will process on import?

I think this thread is going in circles.

You can drag a card to the desktop, you can export it. No category/group entry. So I cannot get a format using that approach.

I have tried every form of the spec I can find in google. No go.

Aug 31, 2008 5:43 PM

Reply Helpful
Question marked as Helpful

Aug 31, 2008 7:04 PM in response to user1724 In response to user1724

user1724,

OK, I've done some testing, and you are correct, but only to a point. Address Book will not import groups; no way, no how. It won't even import groups exported from itself as such. If you haven't followed my previous instructions to get a peek at Address Book's own formatting of Group Vcards, here is an example:


<pre style="overflow:auto; font-family: 'Monaco'; font-size: 10px">BEGIN:VCARD
VERSION:3.0
N:Doe;Sam;;;
FN:Sam Doe
EMAIL;type=INTERNET;type=HOME;type=pref:sl_Doe56@yahoo.com
EMAIL;type=INTERNET;type=HOME:fraggle_stone73@hotmail.com
TEL;type=CELL;type=pref:4407737264919
item1.ADR;type=HOME;type=pref:;;13 Ascott Road;Aylesbury;Buckinghamshire;HP21 2HX;England
item1.X-ABADR:us
CATEGORIES:Rat Pack
X-ABUID:99F85D1A-6C84-44B7-B0E4-FEB92351AC30\:ABPerson
END:VCARD</pre>


Notice the "CATEGORIES:Rat Pack" part. There's your implementation, and everything you need should be there. Of course, what I have posted here is just one contact that is included in a "group Vcard." The other included contacts all appear just like this, and the delimiters are "BEGIN:VCARD" and "END:VCARD."

However, that "CATEGORIES" part is apparently ignored by Address Book when the card is imported. The contacts come in fine, but group placement becomes the domain of that particular Address Book user. I can see some logic to this, as your "run of the mill" user won't want the importation of a Vcard to unilaterally place groups into their Address Book (one would end up with all sorts of irrelevant groups just by importing contacts one at a time). In other words, Address Book isn't supposed to import groups, and we probably wouldn't want it to.

All this said, you can import group Vcards, and have them grouped properly! The trick is that you'll need to create those groups in Address Book first:

1) Create a new group. Select it (it should be blank, so you'll see no contacts).

2) Drag your group Vcard into the window.

Yeah, it's that easy.

Scott

Aug 31, 2008 7:04 PM

Reply Helpful (1)

Sep 1, 2008 12:07 AM in response to Scott Radloff In response to Scott Radloff

That CATEGORIES parm was the first thing I tried, as that is the vCard spec.

I did not see that in the cards that I exported from address book. But on further reflection, that is because I am using the smart groups (see my post above). I should have figured that out . . . duh.

But, as I said, that was the first test I tried, as it is the spec.

It appears I am going to use the workaround I posted above. I cannot have users dragging and dropping hundreds of cards to multiple locations and have any expectation that they will get it right.

This just means that changing a card's group later will be more cumbersome. Pay now or later. In this case I will pick later.

I appreciate the help. You confirmed what I thought I knew - not going to work.

Sep 1, 2008 12:07 AM

Reply Helpful
User profile for user: user1724

Question: vCard import group