CreateItemFromTemplate不适用于自动填充并添加到配置文件的共享邮箱 [英] CreateItemFromTemplate doesn't work with a shared mailbox that's automapped as well as added to the profile

查看:147
本文介绍了CreateItemFromTemplate不适用于自动填充并添加到配置文件的共享邮箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。


我们有几个用户适用于我们两家公司(约80/20)。


因此我们为每个人创建了一个共享邮箱,用于回复来自第二家公司的邮件,并使用我们自己的CRM系统预订会议。


这些邮箱已经创建了已启用自动映射。


然后,我们的一些用户使用Outlook中的"添加帐户"功能将邮箱添加到其Outlook配置文件中,因为这样可以为该帐户设置签名(这是您无法使用自动发送的邮箱。)


但是,这会导致每次从我们的CRM系统中创建约会时,使用以下代码从主邮件帐户发送会议约会:



    Dim appOutlook As Outlook.Application

   设置appOutlook = GetObject(," Outlook.Application")

   

    Dim nsTemp As Outlook.NameSpace

   设置nsTemp = appOutlook.GetNamespace(" MAPI")

   

    Dim recTemp As Outlook.Recipient

   设置recTemp = nsTemp.CreateRecipient("<共享邮箱的电子邮件地址>")

    recTemp.Resolve

   

    Dim folTemp As Outlook.Folder

   设置folTemp = nsTemp.GetSharedDefaultFolder(recTemp,olFolderCalendar)

   

    Dim appTemp As Outlook.AppointmentItem

   

   设置appTemp = appOutlook.CreateItemFromTemplate("< path to template>",folTemp)

    appTemp.Display



如果我从共享邮箱中删除AutoMapping,代码将按预期工作,会议约会将作为辅助邮箱。


我们运行Outlook 2016(2016年8月打补丁)和Exchange 2010 SP3。


任何人都有这个解决方案要求禁用AutoMapping吗?



问候,马丁

解决方案

< blockquote>

嗨Martin,


此论坛适用于与Office 2016和Office 365 ProPlus相关的一般问题和反馈。由于约会是使用代码创建的,因此我会将您的问题转移到Outlook for Developers论坛以获得更有效的支持:


https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=outlookdev


我们建议适当发布的原因是您将获得最合格的受访者群体以及定期阅读论坛的其他合作伙伴可以与我们分享他们的知识或从您的互动中学习
。感谢您的理解。


问候,


Steve Fan


Hi everyone.

We have several users that works for 2 of our companies (approximately 80/20).

Therefore we've created a shared mailbox for each of them to use when responding to mails from the second company and to book meetings from, using our own CRM system.

These mailboxes have been created with AutoMapping enabled.

Some of our users have then added the mailboxes to their Outlook profile, using the Add Account function in Outlook because this enables then to set up a signature for that account (this you cannot do with an automapped mailbox).

However this results in the meeting appointments being send from the primary mail account every time when the appointment is created from within our CRM system, using the following code:

    Dim appOutlook As Outlook.Application
    Set appOutlook = GetObject(, "Outlook.Application")
   
    Dim nsTemp As Outlook.NameSpace
    Set nsTemp = appOutlook.GetNamespace("MAPI")
   
    Dim recTemp As Outlook.Recipient
    Set recTemp = nsTemp.CreateRecipient("<e-mail address of shared mailbox>")
    recTemp.Resolve
   
    Dim folTemp As Outlook.Folder
    Set folTemp = nsTemp.GetSharedDefaultFolder(recTemp, olFolderCalendar)
   
    Dim appTemp As Outlook.AppointmentItem
   
    Set appTemp = appOutlook.CreateItemFromTemplate("<path to template>", folTemp)
    appTemp.Display

If I then remove the AutoMapping from the shared mailbox, the code works as expected and the meeting appointments are sent out as the secondary mailbox.

We run Outlook 2016 (patched in august 2016) and Exchange 2010 SP3.

Anybody got a solution to this that doesn't require AutoMapping to be disabled?

Regards, Martin

解决方案

Hi Martin,

This forum is for general questions and feedback related to Office 2016 and Office 365 ProPlus. Since the appointment is created using code, I'll move your question to the Outlook for Developers forum for more effective support:

https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=outlookdev

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

Regards,

Steve Fan


这篇关于CreateItemFromTemplate不适用于自动填充并添加到配置文件的共享邮箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆