mclisa81 Posted February 25 Posted February 25 Hi, I'm wondering how to handle adding a telephone extension. I realize my code below isn't correct because it dials the whole number, including the extension. I saw a vCard that had the extension in the notes but can't find one that has the extension with the telephone number. Would that be the only way to accomplish this? My rule is below and I will upload my collected files. // vCard format // http://en.wikipedia.org/wiki/VCard // Note that support for vCard may be more limited than for MECARD, // and that vCard requires more data to be encoded, resulting in a denser barcode. var info = { N: Field("Employee Name") + ';;;;' + Field("Suffix"), FN: Field("Employee Name") + ' ' + Field("Suffix"), ORG: Field("Title 2"), TITLE: Field("Title 1"), "EMAIL;type=INTERNET;type=WORK": Field("Email"), "TEL;type=Cell": Field("Cell"), "TEL;type=Work1": Field("Work1") + ' ' + Field("Extension"), "TEL;type=Work2": Field("Work2"), "ADR;type=WORK": ";;" + Field("Address 1") + ';' + Field("City") + ';' + Field("State") + ';' + Field("ZIP"), } var result = ["BEGIN:VCARD", "VERSION:3.0"]; for (var label in info) { if (info[label]) result.push(label + ":" + info[label]); } result.push("END:VCARD"); return MakeQRBarcodeGraphic(result.join(Chr(13) + Chr(10))); One additional question. When I scan the QR Code using my iphone camera, it puts the email under the name at the top, which is incorrect. But when I add it as a contact and view it, the titles are under the name, as they should be. Is this just a glitch or can that be fixed somehow? Thank you in advance Lisa Business Cards code.zip Quote
ThomasLewis Posted February 26 Posted February 26 I've run into this same issue. I don't think phone extensions are part of the vCard spec. Putting it under NOTE: or omitting it entirely, depending on the client, is how I've handled it. This is an easy to read resource for all the other options available: https://www.evenx.com/vcard-3-0-format-specification There are more under the version 4.0 spec but I'm not sure how widely adopted that is: https://en.wikipedia.org/wiki/VCard Quote
mclisa81 Posted February 27 Author Posted February 27 19 hours ago, ThomasLewis said: I've run into this same issue. I don't think phone extensions are part of the vCard spec. Putting it under NOTE: or omitting it entirely, depending on the client, is how I've handled it. This is an easy to read resource for all the other options available: https://www.evenx.com/vcard-3-0-format-specification There are more under the version 4.0 spec but I'm not sure how widely adopted that is: https://en.wikipedia.org/wiki/VCard Thanks for that information! I think putting it under NOTE is the way to go. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.