![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have a set of .vcf files in a regular folder on my hard drive. I
want to read the information on the vcf file to put it into my Access database (I have all of the commands I need in Access for processing the information the way I want it and how to have Access get a hold of the Outlook application). Let's say the file's full name is "C:\Joe_Schnmoe.vcf" I need to be able to "retrieve" the vcf file for processing. If I manually open the vcf file it will be a ContactItem object and I know how to use GetInspector to get the information I want. I don't know how to use VBA to get the vcf file to the point where I can use GetInspector to retrieve the information. [I see the fileSystemObject code in VBA Help, but that code doesn't make it clear how to actually read the information in the file either]. Any thoughts on how to do this, or is there a better way to "read" the information in the file? THANK YOU VERY MUCH!!!!! |
Ads |
#2
|
|||
|
|||
![]()
Two choices:
1) Parse the text in the .vcf file according to the vCard specification (http://www.imc.org/pdi/) 2) Run the .vcf file, which will force Outlook to handle it as a contact Inspector window, from which you can return all the ContactItem fields. See http://www.outlookcode.com/codedetail.aspx?id=212 for sample code. #2 is by far the easier. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message oups.com... I have a set of .vcf files in a regular folder on my hard drive. I want to read the information on the vcf file to put it into my Access database (I have all of the commands I need in Access for processing the information the way I want it and how to have Access get a hold of the Outlook application). Let's say the file's full name is "C:\Joe_Schnmoe.vcf" I need to be able to "retrieve" the vcf file for processing. If I manually open the vcf file it will be a ContactItem object and I know how to use GetInspector to get the information I want. I don't know how to use VBA to get the vcf file to the point where I can use GetInspector to retrieve the information. [I see the fileSystemObject code in VBA Help, but that code doesn't make it clear how to actually read the information in the file either]. Any thoughts on how to do this, or is there a better way to "read" the information in the file? THANK YOU VERY MUCH!!!!! |
#3
|
|||
|
|||
![]()
VCF files are just text files. Unless something is registered to open a VCF
it will do so as a text file. Why not just read the text line by line and parse it into contact properties? You can use FSO or any other method to read the text file line by line or the complete file. If you do the complete file as a string input parse it by using Split on vbCRLF. Examine some VCF files to see what kind of properties are included in the various text lines. You can also look up the VCF RFC to see a complete list of all supported fields, not all of which are supported by Outlook natively. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm wrote in message oups.com... I have a set of .vcf files in a regular folder on my hard drive. I want to read the information on the vcf file to put it into my Access database (I have all of the commands I need in Access for processing the information the way I want it and how to have Access get a hold of the Outlook application). Let's say the file's full name is "C:\Joe_Schnmoe.vcf" I need to be able to "retrieve" the vcf file for processing. If I manually open the vcf file it will be a ContactItem object and I know how to use GetInspector to get the information I want. I don't know how to use VBA to get the vcf file to the point where I can use GetInspector to retrieve the information. [I see the fileSystemObject code in VBA Help, but that code doesn't make it clear how to actually read the information in the file either]. Any thoughts on how to do this, or is there a better way to "read" the information in the file? THANK YOU VERY MUCH!!!!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to import a .vcf file into outlook programatically | Darryn Lavery | Outlook - Using Forms | 0 | March 3rd 06 03:09 PM |
info | Pascale Deleuze | Outlook Express | 1 | February 26th 06 08:44 PM |
createItemFromTemplate and VCF files | [email protected] | Add-ins for Outlook | 1 | February 9th 06 03:27 PM |
.VCF cards and Outlook | Mac | Outlook - Using Contacts | 0 | January 26th 06 10:32 PM |
vcf file attaches itself to email | Yappy Box | Outlook - Using Contacts | 1 | January 20th 06 04:25 AM |