是否可以设置 Outlook 加载项加载时的宽度。现在,当我单击功能区上的插件按钮时,任务窗格会显示在右侧,宽度约为 437 像素。我想将该宽度增加到 820 像素之类的值。
我发现启动 Outlook 加载项时,您在清单中配置的 URL 不会保留片段 URL,这会破坏单页应用程序 (SPA)。如果您只是尝试转到 SPA 的默认路由(例如index.html),那么它工作正常,但如果您尝试直接转到应用程序内的片段URL(路由),那么它就不起作用,例如index.html#我的页面
\n\nindex.html#mypage实际上更改为:\ nindex.html?et=&_host_Info=Outlook|Web|1\xe2\x80\xa6_1480636166782|ocii1|https://outlook.office.com/owa/?realm=XYZ.com#&_serializer_version=1mypage&_xdm_Info=-133b2041_-3d735892_1480636166782|ocii1|https://outlook.office.com/owa/?realm=XYZ.com
有关该问题的进一步说明可以在此处找到:\n https://camerondwyer.wordpress.com/2016/12/02/issues-launching-outlook-add-ins-directly-to-a-spa-route-using-片段网址/
\n\n目前,我无法选择迁移到 HTML5 样式 URL,因此 SPA 内的路由需要使用片段 URL (hashbang)。我想任何尝试启动加载项并在 URL 中传递参数的人都会遇到类似的问题。
\n我们开发了一个 C# Office VSTO 加载项,它与正在运行的 Outlook 实例进行通信(或启动一个新实例),并且在尝试创建 Outlook 任务或约会时,它在某些客户 PC 上显示出存在权限问题的迹象。 。
异常消息如下:
操作中止(HRESULT 异常:0x80004004 (E_ABORT))
这发生在这里:
Outlook.Account DefaultAccount = null;
Outlook.Application outlookApp = GetOutlookApp(); //returns Application object of running Outlook instance / creates a new instance - it works for them.
DefaultAccount = GetAccountForFolder(outlookApp); //returns the default account of the user. Tried it with a simple setup, only one account etc. - it works for them
String defaultemailaddress;
//CODE RUNS UNTIL THIS POINT
if (DefaultAccount == null) //if somehow …Run Code Online (Sandbox Code Playgroud) 我有一个基于 React 的 SPA Outlook 插件,我正在尝试直接调用 Microsoft Graph API。
有没有办法利用Office.context.mailbox.getCallbackTokenAsync()或Office.context.auth.getAccessTokenAsync()获取 AccessToken 以直接从外接程序调用图形 API?
据我所知, getCallbackTokenAsync() 将允许我直接调用 Outlook REST API(我遇到了范围令牌的问题,因为我的清单权限未设置为 ReadWriteMailbox),并且 getAccessTokenAsync() 提供的 SSO 令牌将仅如果我将它传递到某处的服务器以“代表”OAuth 请求运行,则可以工作。
我不想通过 SSO 流通过服务器代理我的所有图形请求,但到目前为止,这是我看到的唯一解决方案。
outlook outlook-addin office365 outlook-restapi microsoft-graph-api
我在C#中使用VSTO。当我单击按钮时,我将附件保存在文件夹中。我的问题是:当我在签名中带有图像的丰富电子邮件时,附件中就有一个元素。但我不想保存该图像。Outlook(应用程序)将此附件隐藏在区域附件中!那么为什么不我:-(
我的代码非常简单:
MailItem MailItemSelected = this.OutlookItem;
foreach (Attachment a in MailItemSelected.Attachments)
{
a.SaveAsFile(path + a.FileName);
}
Run Code Online (Sandbox Code Playgroud)
但是我没有找到不保存签名图像的测试。
我需要在用户签名之后将图像作为电子邮件的一部分嵌入,而不是在电子邮件的末尾,因为如果我发送大型电子邮件的回复,嵌入式图像将位于底部电子邮件链
我正在使用VSTO,VS2008 Fwk3.5和Outlook 2007
这是我的代码:
public partial class ThisAddIn
{
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
this.Application.ItemSend += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemSendEventHandler(Application_ItemSend);
}
private void Application_ItemSend(object Item, ref bool Cancel)
{
if (Item is Outlook.MailItem)
{
Outlook.MailItem mailMessage = (Outlook.MailItem)Item;
//do something to add the image after the signature
}
}
Run Code Online (Sandbox Code Playgroud) 我想自动化Outlook,以便我可以下载电子邮件的"部分",以便我可以将相关的邮件绑定在一起.我知道电子邮件通常有一个"MessageID"来实现此目的,因此可以在上下文中查看电子邮件,因为新闻阅读器中的"线程"是捆绑在一起的.
Outlook是否在与其一起发送的电子邮件中具有"邮件ID"的概念?我看到可以提取的元素(使用自动化)是Subject,SenderEmail,CreationTime,Body,SenderName和HTMLBody.在某个地方也可以使用"消息ID"或等效内容吗?
我试图MailItem从我的加载项捕获对象.我试过看,Globals.FormRegions但没有真正到达任何地方.任何线索如何Outlook.MailItem在新的Compose窗口中访问?
我有一个可以放邮件项目的控件,工作正常,但无法清除选择/项目。
例如:我将邮件1拖放->邮件1在我的列表中从列表中删除邮件1返回Outlook并拖放邮件2
邮件2出现在我的列表中,但邮件1也已恢复!我发现了很多相关的帖子,Marshal.ReleaseComObject但我想我做得不好?
规格:VS2010、4.0框架。Windows 7操作系统,Outlook 2010
这是我的代码的一部分:
调用我的Save方法:
ElseIf e.Data.GetDataPresent("FileGroupDescriptor") Then
Try
Dim SafeSaveMethod As New dlgCallSaveMails(AddressOf SaveMailsFromSelection)
Me.BeginInvoke(SafeSaveMethod, Me.FileData.Pad)
Run Code Online (Sandbox Code Playgroud)
该Save方法:
Private Sub SaveMailsFromSelection(_path As String)
' File uit Outlook
Dim x As Integer
Dim xitmndx As Integer = 0
Dim DestFile As String
Dim oOutLook As New Outlook.Application
Dim oExplorer As Outlook.Explorer
Dim oSelection As Outlook.Selection
Dim strFile As String
oExplorer = oOutLook.ActiveExplorer
oSelection = oExplorer.Selection
Dim currentFolder As MAPIFolder = oExplorer.CurrentFolder
Dim …Run Code Online (Sandbox Code Playgroud) 我正在尝试从我的Outlook加载项发送第三方服务的POST Ajax请求,但无论我尝试接收什么Error: Access is denied,状态0(请求永远不会命中服务器).
假设我们正在运行IE9或8,我尝试了旧的学校黑客,如https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest.
$.ajax({
url: endpoint,
data: JSON.stringify({'1':'2'}),
// headers: {'X-Requested-With': 'XMLHttpRequest'},
contentType: 'text/plain',
type: 'POST',
dataType: 'json',
error: function(xhr, status, error) {
// error
}
}).done(function(data) {
// done
});
Run Code Online (Sandbox Code Playgroud)
我需要实施更多的东西吗?因为我将我的域添加到manifest AppDomain属性.
干杯
outlook-addin ×10
c# ×5
outlook ×5
vsto ×4
office365 ×3
office-js ×2
outlook-2010 ×2
.net-3.5 ×1
ajax ×1
attachment ×1
automation ×1
ms-office ×1
outlook-2007 ×1
vb.net ×1