添加 Outlook 联系人 ??在网站上

发布于 2024-11-02 13:26:54 字数 76 浏览 5 评论 0原文

我被要求在网站上放置一个链接,以便用户可以添加 Outlook 联系人。

任何地方都有这样的例子吗?

谢谢

I am asked to put a link on a site so a user can Add Outlook Contact.

Any examples of this anywhere?

Thanks

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

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

发布评论

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

评论(2

﹎☆浅夏丿初晴 2024-11-09 13:26:54

看看... http:// msdn.microsoft.com/en-us/library/ms268866%28v=vs.80%29.aspx

 private void AddContact()
{
    Outlook.ContactItem newContact = (Outlook.ContactItem)
        this.CreateItem(Outlook.OlItemType.olContactItem);
    try
    {
        newContact.FirstName = "Jo";
        newContact.LastName = "Berry";
        newContact.Email1Address = "[email protected]";
        newContact.CustomerID = "123456";
        newContact.PrimaryTelephoneNumber = "(425)555-0111";
        newContact.MailingAddressStreet = "123 Main St.";
        newContact.MailingAddressCity = "Redmond";
        newContact.MailingAddressState = "WA";
        newContact.Save();
        newContact.Display(true);
    }
    catch 
    {
        MessageBox.Show("The new contact was not saved.");
    }
}

Take a look at... http://msdn.microsoft.com/en-us/library/ms268866%28v=vs.80%29.aspx

 private void AddContact()
{
    Outlook.ContactItem newContact = (Outlook.ContactItem)
        this.CreateItem(Outlook.OlItemType.olContactItem);
    try
    {
        newContact.FirstName = "Jo";
        newContact.LastName = "Berry";
        newContact.Email1Address = "[email protected]";
        newContact.CustomerID = "123456";
        newContact.PrimaryTelephoneNumber = "(425)555-0111";
        newContact.MailingAddressStreet = "123 Main St.";
        newContact.MailingAddressCity = "Redmond";
        newContact.MailingAddressState = "WA";
        newContact.Save();
        newContact.Display(true);
    }
    catch 
    {
        MessageBox.Show("The new contact was not saved.");
    }
}
花开半夏魅人心 2024-11-09 13:26:54

对于任何过来看到此信息的人 - 或者如果 Xtian 仍然需要此信息 - 我相信您正在寻找的答案是 vCard

当然,严格来说它不是一个链接/协议(如 mailto:),而是一个文件,它可能显示为用户的链接,单击时需要单击“打开”才能打开vcf 文件,然后单击“保存”将联系人保存到 Outlook。这将要求 Outlook 仍然与安装时那样与 vcf 文件具有关联(并且没有其他程序声明该关联),但它非常接近“链接”...

生成/提供给用户将具有 .vcf 扩展名和类似于以下的格式:

BEGIN:VCARD
VERSION:2.1
N:Doe;John;;;
FN:John Doe
ORG:Doe Company, The;
TITLE: President
NOTE;ENCODING=QUOTED-PRINTABLE: This is a note associated with this
contact=0D=0A
TEL;WORK;VOICE:(987) 123-4567
TEL;HOME;VOICE:(987) 765-4321
TEL;CELL;VOICE:(987) 135-8642
TEL;WORK;FAX:(987) 246-1357
ADR;WORK:;;1234 North Street;Anytown;TX 751234;;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:1234 North Street=0D=0AAnytown, TX
751234 =0D=0AUnited States of America
URL:
URL:<WWLINK TYPE="GENERIC"
VALUE="http://www.doeweb.com">http://www.doeweb.com</WWLINK>
EMAIL;PREF;INTERNET:[email protected]
REV:19980114T170559Z
END:VCARD

For anyone coming along and seeing this - or if somehow Xtian still needs this info - I believe the answer you are looking for is vCard.

Granted, it's not strictly a link/protocol (like mailto:), but rather a file, it could appear as a link to the user, and when clicked would require a click on "Open" to open the vcf file and a click on "Save" to save the contact to Outlook. It would require that Outlook still has the association with vcf files that it does when it is installed (and that no other program has claimed that association), but it's pretty close to a "link"...

The file generated/provided to the user would have a .vcf extension and a format similar to the following:

BEGIN:VCARD
VERSION:2.1
N:Doe;John;;;
FN:John Doe
ORG:Doe Company, The;
TITLE: President
NOTE;ENCODING=QUOTED-PRINTABLE: This is a note associated with this
contact=0D=0A
TEL;WORK;VOICE:(987) 123-4567
TEL;HOME;VOICE:(987) 765-4321
TEL;CELL;VOICE:(987) 135-8642
TEL;WORK;FAX:(987) 246-1357
ADR;WORK:;;1234 North Street;Anytown;TX 751234;;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:1234 North Street=0D=0AAnytown, TX
751234 =0D=0AUnited States of America
URL:
URL:<WWLINK TYPE="GENERIC"
VALUE="http://www.doeweb.com">http://www.doeweb.com</WWLINK>
EMAIL;PREF;INTERNET:[email protected]
REV:19980114T170559Z
END:VCARD
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文