Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: createItemFromTemplate and VCF files

Geek News

createItemFromTemplate and VCF files
fartlegs[ at ]gmail.com 2/9/2006 3:20:11 PM
Hi there,

Does anybody know if there's a way to leverage the
createItemFromTemplate (or similar) function to create a contact item
in ol2003 using either redemption or outlook apis?

I'm using it to parse large numbers of emails - and their attachments -
and the createItemFromTemplate(filename) works fine for .msg and .eml
files but not .vcf files. When I use it against a vcf, I get the
following error thrown:

Run-time exception thrown : System.Runtime.InteropServices.COMException
- Can't open file: c:\crap\203\0011.vcf. The file may not exist, you
may not have permission to open it, or it may be open in another
program. Right-click the folder that contains the file, and then click
Properties to check your permissions for the folder.

Opening the file by double-clicking it works fine. All I'm interested
in is reading it in, then extracting the information into a legible
format, then deleting it.

Thanks in advance
Dave

Re: createItemFromTemplate and VCF files
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 2/9/2006 3:27:35 PM
CreateItemFromTemplate works only with .oft and .msg files. You need to use a different approach with .vcf files, either parsing their text using the vCard specification (hard) or opening them with a shell Execute command and using the resulting Inspector (easy - see http://www.outlookcode.com/codedetail.aspx?id=212
for a code sample)

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


<fartlegs[ at ]gmail.com> wrote in message news:1139498411.373285.85070[ at ]z14g2000cwz.googlegroups.com...
[Quoted Text]
> Hi there,
>
> Does anybody know if there's a way to leverage the
> createItemFromTemplate (or similar) function to create a contact item
> in ol2003 using either redemption or outlook apis?
>
> I'm using it to parse large numbers of emails - and their attachments -
> and the createItemFromTemplate(filename) works fine for .msg and .eml
> files but not .vcf files. When I use it against a vcf, I get the
> following error thrown:
>
> Run-time exception thrown : System.Runtime.InteropServices.COMException
> - Can't open file: c:\crap\203\0011.vcf. The file may not exist, you
> may not have permission to open it, or it may be open in another
> program. Right-click the folder that contains the file, and then click
> Properties to check your permissions for the folder.
>
> Opening the file by double-clicking it works fine. All I'm interested
> in is reading it in, then extracting the information into a legible
> format, then deleting it.
>
> Thanks in advance
> Dave
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net