非英语 Outlook:如果对文档进行更改,Outlook 会挂起。
Non English Outlook: Outlook hangs if a change to a document is made.
我遇到了一个在英文版 Outlook 2013 中没有重现的问题。
如果我获取 MailItem 的 Document.Content
并更改其 Text
属性,在关闭 Inspector 后,Outlook 将挂起,我将不得不使用任务管理器终止进程。
这是我的代码运行:
class Program
{
public Program()
{
Outlook.Application appOutlook;
appOutlook = (Outlook.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Outlook.Application");
Outlook.Inspector insp = appOutlook.ActiveInspector();
Word.Document doc = insp.WordEditor;
if (doc.ProtectionType != Word.WdProtectionType.wdNoProtection)
{
doc.Unprotect();
}
doc.Content.Text = "test";
Console.ReadLine();
}
static void Main(string[] args)
{
Program program = new Program();
}
}
同样,这在英语中运行顺利,但在德语和其他语言中也会挂起应用程序。
我注意到关闭阅读窗格可以防止 Outlook 挂起。
如有任何帮助,我们将不胜感激。
将 WWLIB.dll 更改为最新版本解决了该问题。
我遇到了一个在英文版 Outlook 2013 中没有重现的问题。
如果我获取 MailItem 的 Document.Content
并更改其 Text
属性,在关闭 Inspector 后,Outlook 将挂起,我将不得不使用任务管理器终止进程。
这是我的代码运行:
class Program
{
public Program()
{
Outlook.Application appOutlook;
appOutlook = (Outlook.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Outlook.Application");
Outlook.Inspector insp = appOutlook.ActiveInspector();
Word.Document doc = insp.WordEditor;
if (doc.ProtectionType != Word.WdProtectionType.wdNoProtection)
{
doc.Unprotect();
}
doc.Content.Text = "test";
Console.ReadLine();
}
static void Main(string[] args)
{
Program program = new Program();
}
}
同样,这在英语中运行顺利,但在德语和其他语言中也会挂起应用程序。
我注意到关闭阅读窗格可以防止 Outlook 挂起。
如有任何帮助,我们将不胜感激。
将 WWLIB.dll 更改为最新版本解决了该问题。