简体   繁体   English

如何在Outlook 2013中以编程方式(C#)创建和添加默认(HTML)签名?

[英]How to programmatically (C#) create and add a default (HTML) signature in Outlook 2013?

Sorry for bothering you - but maybe somebody can help me here!? 抱歉打扰您-也许有人可以在这里帮助我!

We are creating an Outlook 2013 VSTO Add-In to manage Corporate Signatures centrally and publish them to every user as a default signature. 我们正在创建一个Outlook 2013 VSTO加载项,以集中管理公司签名,并将它们作为默认签名发布给每个用户。

We already managed to create the appropriate HTML files and store them in the correct folder. 我们已经设法创建适当的HTML文件并将它们存储在正确的文件夹中。

All the same, there is no problem at all to modify the appropriate Registry keys, eg 一样,修改适当的注册表项根本没有问题,例如

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\General

where we set the value of the "Signatures" element to the folder name of the signature file(s) 我们将“ Signatures”元素的值设置为签名文件的文件夹名称

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\MailSettings

where we set the value of the "NewSignature" and "ReplySignature" elements to the name of the default signature file 我们将“ NewSignature”和“ ReplySignature”元素的值设置为默认签名文件的名称

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676

where - within the appropriate user profile folder - we need to set the values of the "New Signature" and "Reply-Forward Signature" elements to the binary-converted name of the default signature file. 在适当的用户配置文件文件夹中,我们需要将“新签名”和“转发转发签名”元素的值设置为默认签名文件的二进制转换名称。

All these operations work perfectly fine and afterwards, we find the correct files in the appropriate folders and the correct entries in the Registry keys. 所有这些操作都可以正常工作,然后,我们在适当的文件夹中找到正确的文件,在注册表项中找到正确的条目。

However, when creating the very first eMail after the Outlook and eMail Signature Add-In setup, users do NOT see the default signature ! 但是,在Outlook和电子邮件签名加载项设置之后创建第一个电子邮件时用户看不到默认签名

Only as soon as they once open the "Signatures" dialog in the mail editor screen - and it is really enough to only open it; 只要他们一旦打开邮件编辑器屏幕中的“签名”对话框,就足以打开它了。 no need to click "OK" or so! 无需单击“确定”左右! - then they get the signature! -然后他们得到签名!

So my question is: is there any other Registry key or whatever that need(s) to be set so that the signature appears right away - without having to make users open the "Signatures" dialog!? 所以我的问题是:是否还有其他注册表项或需要设置的其他项以便签名立即显示-无需使用户打开“签名”对话框! Does anybody know what happens in the background of this dialog!? 有人知道此对话框的背景会发生什么吗??

What do I overlook!? 我忽略了什么!

Thank you very much everyone - I truly hope you can help me here! 非常感谢大家-我真的希望您能在这里帮助我!

Best regards, Torsten 最好的问候,Torsten

The "9375CFF0413111d3B88A00104B2A6676" part is profile and account specific (it is profile section uid). “ 9375CFF0413111d3B88A00104B2A6676”部分是个人资料和帐户特定的(它是个人资料部分的uid)。 It will be different for different users, profiles, and different accounts within the same profile . 对于同一个人资料中的不同用户,个人资料和不同帐户,它会有所不同。

You can see the data in OutlookSpy - click IOlkAccountManager, double click on the account, New and reply signature names will be in properties 0x0016001F and 0x0017001F respectively. 您可以在OutlookSpy中看到数据-单击IOlkAccountManager,双击该帐户,“新建”和“答复签名”名称将分别位于属性0x0016001F和0x0017001F中。

These properties can be set using Extended MAPI (C++ or Delphi) on IOlkAccount interface. 可以使用IOlkAccount接口上的扩展MAPI(C ++或Delphi)来设置这些属性。 You can also set them using Redemption (any language) - RDOAccount object exposes NewMessageSignature and Reply properties as well as Fields[] (can be used to set any property). 您也可以使用“ 兑换” (任何语言)设置它们-RDOAccount对象公开NewMessageSignature和Reply属性以及Fields [](可用于设置任何属性)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C#设置Outlook默认签名 - C# Set Outlook Default Signature Outlook 2013:以编程方式回复带有HTML签名的电子邮件 - Outlook 2013: Programmaticaly reply to emails with HTML signature C#通过Outlook 2013发送HTML电子邮件 - c# send html email via outlook 2013 Visual Studio 2012-C#-Outlook 2013附加 - Visual Studio 2012 - C# - outlook 2013 Add on 以编程方式将Listview添加到Sharepoint 2013 C#中的所有列表 - Add a listview programmatically to all lists in Sharepoint 2013 C# 以C#编程创建内容数据库(SP 2013) - Programmatically create content database in C# (SP 2013) 如何从 .NET 和 C# 中的 SAML 断言中的数字签名参数以编程方式创建 X509 证书 - How to programmatically create a X509 cert from the digital signature parameters in a SAML assertion in .NET and C# 如何使用csom c#在SharePoint 2013中以编程方式创建网站集? - How to create site collection programmatically in SharePoint 2013 using csom c#? 在生成的电子邮件中添加默认的 Outlook 签名 - Add the default outlook signature in the email generated C#以编程方式在Outlook“ Internet日历订阅”中添加webcal:link? - C# programmatically add webcal:link in Outlook “internet calendar subscription”?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM