调用Bookmark.Range.GoToPrevious时,Outlook插件崩溃 [英] Outlook Plugin crash when calling Bookmark.Range.GoToPrevious
问题描述
我们有一个插件,需要在电子邮件签名之前插入一些链接,或者只是在电子邮件正文的末尾插入一些链接。所以我们使用
Range.GoToPrevious API。 bookmark.aspx"rel ="nofollow noreferrer">
Bookmark ,例如BookMark.Range.GoToPrevious(WdGoToItem.wdGoToLine),试图找到电子邮件正文的位置。但有时,此调用可能会导致Outlook崩溃。它不会抛出任何异常,它只会使前景崩溃所以我们在这一点调试非常困难
。只是想知道是否有人可以解决这个问题。
We have a plugin which needs to insert some links before email signature or just at end of email body. So we are using the Range.GoToPrevious API on Bookmark such as BookMark.Range.GoToPrevious(WdGoToItem.wdGoToLine) to try to locate the position at the email body. However sometime, this call could cause outlook crash. It won't throw any exception, it would just crash the outlook so it is very hard for us to debug at this point. Just wonder if anyone could shed some lights on this.
推荐答案
你好,
你做了什么Outlook事件处理程序用于处理Word对象模型?
What Outlook event handler did you use for dealing with the Word object model?
作为一种解决方法,您可以考虑使用HTMLBody属性。所有用户签名都存储在以下文件夹中:
As a workaround you may consider using the HTMLBody property instead. All users signatures are stored in the following folders:
-
Windows XP
C :\Documents and Settings \%username%\ Application Data \ microsoftoft \ Signign
-
Windows 8,Windows 7和Windows Vista
C:\ Users \%username%\ AppData \ Rooaming\Microsoft \ Signign
文件是:
-
< signature_name& gt; .htm
创建HTML消息时使用此文件。 -
< signature_name> .rtf
创建Rich Text消息时使用此文件。 -
< signature_name> .txt
创建纯文本邮件时使用此文件。 -
< signature_name> _files
此文件夹在Outlook 2007,2010和2013中用于存储签名的支持文件,如格式,图像和/或名片(vcf文件)。
因此,您可以在HTML标记中搜索用户签名而不是使用Word。
So, you can search for a user signature in the HTML markup instead of using Word.
这篇关于调用Bookmark.Range.GoToPrevious时,Outlook插件崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!