从 Outlook 中将所有联系人导出为 vcard

发布于 2024-07-07 13:56:32 字数 291 浏览 8 评论 0原文

因此,我想将 Outlook 中的所有联系人导出为 vcard。 如果我用谷歌搜索,我会得到一堆共享软件程序,但我想要一些免费的、可以运行的软件。

如果我自己编写代码,我想我应该使用 Microsoft.Office.Interop.Outlook 程序集。 有人已经编写了将 ContactItems 转换为 vcard 的代码吗?

编辑:我以完全不同的方式解决了这个问题,请参阅下面的答案,但我已将 dok1.myopenid.com 的答案标记为已接受,因为它回答了我原来的问题。

So, I want to export all my contacts from Outlook as vcards. If I google that, I get a bunch of shareware programs, but I want something free that just works.

If I'm to code it myself, I guess I should use the Microsoft.Office.Interop.Outlook assembly. Has anyone already code to convert ContactItems to vcards?

Edit: I solved it in a completely different way, see answer below, but I have marked dok1.myopenid.com's answer as accepted because it answers my original question.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

潜移默化 2024-07-14 13:56:33

他们确实很难找到,不是吗? 看看这是否有帮助。
http://msdn.microsoft.com/en-us /library/aa579624(EXCHG.80).aspx

其中包括: 以下示例使用 CDO Person 对象获取联系人的 vCard 信息。

Dim oPerson As New CDO.Person
Dim strm As New ADODB.Stream

' Assume strURL is a valid URL to a person contact item
oPerson.DataSource.Open strURL

' You can set the ADO Stream object to the returned vCard stream
Set strm = oPerson.GetvCardStream

' Save the stream to a file.
' Note: using adSaveCreateOverwrite may cause an existing
' contact to be overwritten.
strm.SaveToFile "d:\vcard.txt", adSaveCreateOverwrite

' You don't have to set a Stream object,
' just use the Stream methods off GetvCardStream directly
oPerson.GetvCardStream.SaveToFile "d:\vcard.txt", adSaveCreateOverwrite

是的,唯一的代码示例是用 VB 编写的。

They sure make it hard to find, don't they? See if this helps.
http://msdn.microsoft.com/en-us/library/aa579624(EXCHG.80).aspx

That includes: The following example uses the CDO Person object to obtain vCard information for a contact.

Dim oPerson As New CDO.Person
Dim strm As New ADODB.Stream

' Assume strURL is a valid URL to a person contact item
oPerson.DataSource.Open strURL

' You can set the ADO Stream object to the returned vCard stream
Set strm = oPerson.GetvCardStream

' Save the stream to a file.
' Note: using adSaveCreateOverwrite may cause an existing
' contact to be overwritten.
strm.SaveToFile "d:\vcard.txt", adSaveCreateOverwrite

' You don't have to set a Stream object,
' just use the Stream methods off GetvCardStream directly
oPerson.GetvCardStream.SaveToFile "d:\vcard.txt", adSaveCreateOverwrite

Yep, the only code sample there is in VB.

零度℉ 2024-07-14 13:56:33

刚刚购买了 X8,当我无法轻松转移我的联系人时,我真的很生气……直到我开始在手机上窥探。

首先,将 Outlook 中的所有联系人导出到 vCard(我发现通过电子邮件将它们发送给自己是最简单的。如果您收到错误消息“多个附件...”,您可以将它们从电子邮件中保存到已发送项目文件夹中)并复制将 vCard 复制到手机上的存储卡中。

其次,打开手机上的地址簿,然后按手机上的左侧按钮(上面有 4 个小方块的按钮。不是屏幕上的 4 个框……物理按钮!)。

第三,选择“导入/导出”并选择从存储卡导入。 导入所有 vCard 文件,您应该会很满意。

祝你好运...不要问我任何问题,因为我不会再回来看任何帖子...只是路过试图自己弄清楚。

Just purchased the X8 and was about to get really really mad when I couldn't easily transfer my contacts...until I started snooping around on the phone.

First, export all your contacts in Outlook to vCards (I found emailing them to yourself is the easiest. If you get an error message "to many attachments..." you can save them from the email in your sent items folder) and copy the vCards to the memory card on your phone.

Second, open your address book on the phone then press the left button on the phone (the button with 4 little squares above it. NOT THE 4 BOXES ON THE SCREEN...THE PHYSICAL BUTTON!).

Third, select "Import/Export" and choose import from memory card. Import all vCard files and you should be golden.

Best of luck...don't ask me any questions because I will not be back to look at any more posts...just passing by trying to figure it out on my own.

罪#恶を代价 2024-07-14 13:56:32

我以非编程方式解决了这个问题:

  • 选择 Outlook 中的所有联系人
  • 将它们作为卡片转发给我自己
  • 将所有附件 (vcard) 保存在文件夹 c:\temp
  • 打开命令提示符并输入命令 copy /a *.vcf c:\allcards.vcf 将所有 vcard 连接成一个

I solved it in a non-programmatically way:

  • Selected all contacts in Outlook
  • Forwarded them as cards to myself
  • Saved all the attachments (vcards) in a folder, c:\temp
  • Opened a command prompt and typed the command copy /a *.vcf c:\allcards.vcf which concatenates all vcards into one
玻璃人 2024-07-14 13:56:32

对于它的价值 - 我刚刚遇到这个线程,正在寻找从 Outlook 到单个 .VCF 文件的相同导出。 我有 2007 年(不知道这是否有影响),但我选择了所有联系人并将它们拖到新电子邮件中以作为单独的 .VCF 文件添加。 添加完所有附件后,我单击新电子邮件的附件部分,按 CTRL-A 突出显示所有附件,然后左键单击并将第一个附件(以及所有附件)拖动到我想要单独添加的文件夹中。 VCF 文件传入。Outlook 几分钟“思考”我的 400 个联系人,他们都在那里!

For what it's worth - I just came across this thread looking for the same export to individual .VCF files from outlook. I haev 2007 (don't know if that makes a difference) but I selected all contacts and dragged them to a new email message to be added as individual .VCF files. After they were all added, I clicked in the attachments section of the new email, hit CTRL-A to highlight all of them, then left-click-dragged the first (and therefore all of them) to the folder I wanted the individual .VCF files in. A few minutes of Outlook "thinking" about my 400 contacts they were all there!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文