是否可以以编程方式设置Outlook 2013默认签名设置?我们可以生成用户的签名确定,但是也希望将签名设置为默认显示在用户的电子邮件中:

在Outlook配置文件中,设置本身似乎隐藏在注册表中:
HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6677\00000002
Reg值:
New SignatureReply-Forward Signature...(具有二进制数据,可能编码HTML文件名/参考).
不确定我是否可以使用Outlook对象模型来访问和设置设置?使用ClickOnce应用程序是否可以实现这一点?
我在创建一些 HTML 电子邮件以在 Outlook 桌面 2013 中正确显示时遇到问题,我已经设法解决了迄今为止关于我无法理解的边框问题的所有问题。
基本上在 Outlook Web 应用程序中,我的表格如下所示: https: //i.stack.imgur.com/vpTui.jpg
但在 Outlook 2013 上,它看起来像这样: https: //i.stack.imgur.com/b8jFp.jpg
这是我的表代码,然后 Outlook 就把它吃掉并弄得一团糟:
<table cellspacing="0" cellpadding="1" border="0" align="center" width="100%" style="margin:auto;">
<thead>
<tr height="40" style="background-color: #CFE1D3; ">
<th align="center" width="17%" style="line-height: 1.6em; border-style: solid; border-color: #777; border-width: 1px 0 0 1px;"><strong><?php echo $this->__('Item') ?></strong></th>
<th align="center" width="17%" style="line-height: 1.6em; border-style: solid; border-color: #777; border-width: 1px 0 0 1px;"><strong><?php echo $this->__('Product Code') ?></strong></th>
<th align="center" width="30%" style="line-height: 1.6em; border-style: solid; border-color: #777; border-width: …Run Code Online (Sandbox Code Playgroud) 在开发html电子邮件新闻通讯时,我经常使用类似于以下内容的结构:
<table width="244" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffcc">
<tr>
<td>
<table border="0" align="left">
<tbody>
<tr>
<td bgcolor="#FFCCCC">text in the table cell.<br>and another line of text.<br>and a third line.</td>
</tr>
</tbody>
</table>
Hello. This is sample text. This is another sentence. Hello. This is sample text. This is another sentence. Hello. This is sample text. This is another sentence.</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
在浏览器中查看时,结果如下所示:

但是当由Outlook 2013呈现时,主(黄色)表中最左边的文本被切除:

是否有解释或解决方法?
(我通常将图像而不是文本放在内部(粉红色)表中。这样可以进行设计,使主要(黄色)文本似乎在图像周围流动。无论图像还是文本,结果都是相同的。如此处所示,主(黄色)表中的文本被截断了。)
我有这个表,我需要在单元格之间的间距:
<table cellpadding="0" cellspacing="5px">
<tr>
<td><img src="http://placehold.it/100"/></td>
<td><img src="http://placehold.it/100"/></td>
<td><img src="http://placehold.it/100"/></td>
<td><img src="http://placehold.it/100"/></td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
在Outlook 2007,2010和2013中,间距不正确,而在其他客户端中它看起来很好.
Outlook 2007,2010和2013:

其他客户:

我该如何解决?
我正在尝试使用 Python win32com 库从 Outlook(2013) 获取事件,我设法做到了这一点,但是我无法获得它们的状态(已接受、暂定、已拒绝)。当我当前的代码获取所有事件时,找出它们的状态很重要。我在网上读到存在一个 AppointmentItem.ResponseStatus 属性,但是我没有设法使用它让它工作。谁能告诉我如何为 Python 实现这一目标?
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox = outlook.GetDefaultFolder(9) # "9" refers to the index of a folder - in this case,
# the events/appointments. You can change that number to reference
# any other folder
events = inbox.Items
Run Code Online (Sandbox Code Playgroud) 我们有一个C#Outlook加载项,允许最终用户单击功能区中的一个按钮以在新电子邮件中插入一些内容.我们正在使用MailItem.GetInspector.WordEditor来执行此操作.然而,奇怪的是我们的程序无法一直获得WordEditor.到目前为止,它只在我的机器上.
我们会像这样得到例外
System.Runtime.InteropServices.COMException (0x9CD04005): The operation failed.
at Microsoft.Office.Interop.Outlook._Inspector.get_WordEditor()
Run Code Online (Sandbox Code Playgroud)
最后4位数字总是4005,而前4位数字可能会改变.前4个应该引用发生错误的组件.
我在我的机器上安装了outlookspy,它也无法获得WordEditor.

我通过互联网进行了一些搜索并发现了这个链接:system.Runtime.InteropServices.COMException(0xB5904005):操作失败,因此它表明我们会在Activate事件上获取WordEditor以确保WordEditor完全初始化,但是在新的电子邮件,它应该已经根据我们的理解激活,除非我们在这里遗漏了一些东西 另外,我在一封新邮件上多次运行OUtlookSpy,每次WordEditor都为空.所以它似乎不应该是初始化问题.
有人可以对我们应该在这里调查的内容有所了解吗?
c# ms-office outlook-object-model outlook-addin outlook-2013
我只在Outlook 2013中遇到HTML电子邮件问题,在2007年和2010年的早期版本中看起来很棒.
我添加了style ="display:block;我的表和td有一个黑色的背景颜色.我尝试在td上指定宽度和高度以及img和一个line-height样式,如前面的帖子所示,包含td .
这是代码:
<table width="200" cellpadding="0" cellspacing="0" align="right" bgcolor="#000000"><tr><td width="156" height="158" style="background-color:#000000; line-height:13px;"><img src="http://identifix.skmgroupwork.com/email/iden074/images/JerryGTruglia.jpg" width="156" height="158" align="right" alt="Jerry G Truglia" style="padding: 0px 20px 0px 0px; width: 156px; height: 158px;display:block;"></td></tr></table>
Run Code Online (Sandbox Code Playgroud)
包含代码:
<table width="510" align="center" cellpadding="0" cellspacing="0" style="" bgcolor="#000000">
<tbody>
<tr>
<td colspan="2" align="left" valign="top" style="font-family: Arial, Helvetica, sans-serif; color: #ffffff; font-size: 12px; line-height: 20px; padding: 0px 30px 0px 40px; ">
<table width="180" cellpadding="0" cellspacing="0" align="right" bgcolor="#000000"><tr><td width="156" height="168" style="background-color:#000000; line-height:13px;"><img src="http://identifix.skmgroupwork.com/email/iden074/images/JerryGTruglia.jpg" width="156" height="158" align="right" alt="Jerry G Truglia" style="padding: …Run Code Online (Sandbox Code Playgroud) 我正在尝试为Outlook 2013创建一个VBA宏,它将在我当前正在编写的电子邮件中采用所选文本(HTML格式)并设置字体大小/颜色/粗体/突出显示.
我的宏有两个if/then块.一个块用于Outlook 2003,并为所有四个文本特征提供所需的结果.但是,在2003年之后,Outlook使用Word EditorType来处理HTML电子邮件,因此我需要一个具有不同语法的不同VBA块来更改所选文本的字体.我的2013块中的VBA可以正确地用于更改粗体/磅值,但它不会对文本应用突出显示.相反,突出显示文本的命令(rng.Range.HighlightColorIndex = wdYellow)导致选择窗口的背景颜色变为清除(这样即使仍然真正选择了文本,也不再显示文本) ,但没有突出显示应用于所选文本.
当突出显示文本不起作用时,我尝试了其他的东西.我尝试使用vba命令将背景设置为黄色(当没有vba手动应用时,它具有相同的视觉效果).rng.Shading.BackgroundPatternColor = wdColorYellow.但是,背景变为黑色,而不是将背景变为黄色.
2013块也不会导致字体颜色发生变化.尽管声明(rng.Font.Color = wdColorBlue),字体颜色仍保持黑色
请告诉我如何将所选文本突出显示为黄色并将所选文本的颜色设置为蓝色.
完整的VBA宏如下所示.
Sub ChangeSelectedFontBold14HiYellow()
Dim msg As Outlook.MailItem
Dim insp As Outlook.Inspector
Set insp = Application.ActiveInspector
If insp.CurrentItem.Class = olMail Then
Set msg = insp.CurrentItem
If insp.EditorType = olEditorHTML Then ' outlook 2003
Set hed = msg.GetInspector.HTMLEditor
Set rng = hed.Selection.createRange
rng.pasteHTML "<b><font style='color: blue; background: yellow; font-size: 14pt;'>" & rng.Text & "</font></b>"
End If
If insp.EditorType = olEditorWord Then ' outlook 2013
Set hed = …Run Code Online (Sandbox Code Playgroud) Explorer物体不发射的事件可能是什么原因?我正在使用下面的简单代码,只是为所有Explorer对象注册事件.我总是Init new Explorer!在调试窗口中获取一行,因此有一个Explorer对象.当我在Outlook中单击时,从邮件切换到日历视图,选择项目,切换回,切换到联系人,...我只得到一些(!)的第一个事件,而不是确定性的哪个事件.几秒钟之后,尽管仍然保持点击和更改视图,但我没有获得更多活动.这有什么不对?
private void ThisAddInStartup(object sender, System.EventArgs e)
{
foreach (var exp in this.Application.Explorers)
{
this.ExplorersOnNewExplorer(exp as Explorer);
}
this.Application.Explorers.NewExplorer += this.ExplorersOnNewExplorer;
}
private void ExplorersOnNewExplorer(Explorer currentExplorer)
{
Debug.WriteLine("Init new Explorer!");
currentExplorer.BeforeViewSwitch += this.CurrentExplorerOnBeforeViewSwitch;
currentExplorer.BeforeFolderSwitch += this.CurrentExplorerOnBeforeFolderSwitch;
currentExplorer.SelectionChange += this.CurrentExplorerOnSelectionChange;
currentExplorer.ViewSwitch += this.CurrentExplorerOnFolderSwitch;
currentExplorer.FolderSwitch += this.CurrentExplorerOnFolderSwitch;
}
private void CurrentExplorerOnBeforeFolderSwitch(object newFolder, ref bool cancel)
{
Debug.WriteLine("BeforeFolderSwitch!");
}
private void CurrentExplorerOnBeforeViewSwitch(object newView, ref bool cancel)
{
Debug.WriteLine("BeforeViewSwitch!");
}
private void CurrentExplorerOnFolderSwitch()
{
Debug.WriteLine("CurrentExplorerOnFolderOrViewSwitch!"); …Run Code Online (Sandbox Code Playgroud) 对于我的生活,我不明白为什么我的 href 标签在 Outlook 2013 中不起作用。我在同一个 html 文件中还有其他以相同方式编写的锚标签。似乎href标签被完全剥离了。它们适用于所有其他电子邮件客户端,除了 Outlook 2013。有什么我可能遗漏的吗?任何帮助表示赞赏。
<table align="center" class="inner">
<tr>
<td align="left" width="65"> <a href="https://facebook">
<img src="./img/social-fb.png" width="65" style="display:block;">
</a> </td>
<td align="left" width="65">
<a href="https://www.instagram.com/">
<img src="./img/social-in.png" width="65" style="display:block;"></a>
</td>
</tr>
</table>Run Code Online (Sandbox Code Playgroud)
它在gmail,hotmail vb中看起来很好,但我无法解决Outlook中的空间问题.它只在图像之间显示1px的空白,而只是垂直显示.任何帮助将不胜感激,谢谢.
这是我的代码.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td>
<table border="0" cellspacing="0" cellpadding="0" style="width: 700px; border-spacing: 0px; font-family: Arial; margin: 0 auto; display: block; border-collapse: collapse">
<tr>
<td>
<img src="1.jpg" alt="mail" />
</td>
<td>
<img src="2.jpg" alt="mail" />
</td>
<td>
<img src="3.jpg" alt="mail" />
</td>
</tr>
<tr>
<td>
<img src="4.jpg" alt="mail" />
</td>
<td>
<a href="#">
<img src="5.jpg" alt="mail" /></a>
</td>
<td>
<img src="6.jpg" alt="mail" /> …Run Code Online (Sandbox Code Playgroud) 我有一个包含 3 列的页脚,这些列都严格嵌套在 HTML 电子邮件模板的基于表格的布局中。我正在尝试修复页脚,其中第三列的行高与前两列的顶部基线不匹配。
我一直在进行研究,看看是否有解决方案,并尝试了声明的mso-line-height-rule:exactly; mso-text-raise:44px;最后一列的变体line-height,但它似乎没有任何效果。
您可以在下图中看到,最后一列的文本向下移动,并且文本的间距与在电子邮件中正确呈现的第二张图像有所不同。
Outlook 2013(在 Amazon Workspace - Windows 7 Pro 中):
Mac 版 Outlook 2011:
页脚代码:
<!-- Footer -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr>
<td class="content-spacing" style="font-size:0pt; line-height:0pt; text-align:left" width="1"></td>
<td align="center">
<table width="650" border="0" cellspacing="0" cellpadding="0" class="mobile-shell">
<tr>
<td class="td" style="width:650px; min-width:650px; font-size:0pt; line-height:0pt; padding:0; margin:0; font-weight:normal; Margin:0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="spacer" style="font-size:0pt; line-height:0pt; text-align:center; width:100%; min-width:100%"><tr><td height="25" …Run Code Online (Sandbox Code Playgroud) outlook-2013 ×12
outlook ×8
html-email ×5
html ×4
css ×2
email ×2
.net ×1
c# ×1
image ×1
ms-office ×1
outlook-2007 ×1
outlook-2010 ×1
outlook-2011 ×1
python ×1
pywin32 ×1
vba ×1
vsto ×1
win32com ×1