邮件应用程序撰写模式 - 无法在Outlook桌面客户端中获取电子邮件正文内容 [英] Mail App compose mode - Unable to get email body content in outlook desktop client

查看:93
本文介绍了邮件应用程序撰写模式 - 无法在Outlook桌面客户端中获取电子邮件正文内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Outlook桌面客户端运行我的邮件应用程序时,我无法在撰写模式下获取正文内容。但是,当我在IE浏览器或Chrome或FF浏览器中访问我的应用程序时,我能够获得正文内容。任何人都可以帮我解决这个问题吗?
请参阅随附的屏幕截图。

I am unable to get body content in compose mode when i run my mail app in outlook desktop client. But, I am able to get body content when i access my app in outlook web either in IE or Chrome or FF browsers. Can anybody help me what could be the issue here? Kindly refer to attached screen shot.

仅供参考,我使用的是1.1版本的Office.js,这是我的代码片段来读取正文内容。

FYI, i am using 1.1 version of Office.js and here is my code snippet to read body content.

 function getBody() {
        Office.cast.item.toMessageCompose(Office.context.mailbox.item).body.getAsync(function (result) {
            app.showNotification('The current body is', result.value)
        });

        //Office.context.mailbox.item.body.getAsync(Office.MailboxEnums.BodyType.Html, function (result) {
        //    app.showNotification('The current body is', result.value)
        //})
    }

谢谢,

Niranjan

推荐答案

您好Niranjan,

Hi Niranjan,

感谢您的帖子。

我用这种方法做了一个测试,然后我再现了你的问题。 body.getAsync似乎在Outlook桌面中不存在,并且它在outlook web app下正常工作。我认为它与outlook客户端版本有关,我将我的Outlook更新到最新,但是
我仍​​然无法使其工作。然后,我在VS2015和Office 2016 Preview下进行测试,并且使用body.getAsync,您需要传递参数类型和函数。下面的代码工作正常。

I made a test with this method, and I reproduced your issue. body.getAsync seems to not exist in outlook desktop and it worked correctly under outlook web app. I assume it is related with the outlook client version, and I update my outlook to newest, but I still could not make it work. Then, I test under the VS2015 and Office 2016 Preview, and with body.getAsync, you need to pass the parameter type and function. The code below worked correctly.

function GetBodyTest() {
    Office.context.mailbox.item.body.getAsync("text",function (result) {
        app.showNotification('The current body is', result.value)
    });    
 };

如果这是您希望在Office for Office 2013的应用程序的未来版本中包含的功能,请向Office Development Platform Uservoice提交反馈。

http://officespdev.uservoice.com

If this is a feature you want to include in future versions of app for Office for Office 2013, please submit a feedback to Office Development Platform Uservoice.
http://officespdev.uservoice.com

最诚挚的问候,

Edward


这篇关于邮件应用程序撰写模式 - 无法在Outlook桌面客户端中获取电子邮件正文内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆