A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

vcf files--getting the info for use by Access



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 25th 06, 12:03 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 2
Default vcf files--getting the info for use by Access

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  
Old January 25th 06, 01:59 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default vcf files--getting the info for use by Access

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  
Old January 25th 06, 02:43 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default vcf files--getting the info for use by Access

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 10:31 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.