是否可以为非MS云提供商定制PR_ATTACH_METHOD = ATTACH_BY_WEBREFERENCE? [英] Is it possible to customize PR_ATTACH_METHOD = ATTACH_BY_WEBREFERENCE for a non-MS cloud provider?

查看:109
本文介绍了是否可以为非MS云提供商定制PR_ATTACH_METHOD = ATTACH_BY_WEBREFERENCE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个云存储服务,可以通过生成的URL在我们的Web查看器中查看文档。在我们的Outlook VSTO加载项中,我们希望用户能够将生成的URL作为链接附件发送,就像您目前通过附加文件在Outlook 2016中执行
一样 - >浏览网站位置 - > OneDrive(等)。

We have a cloud storage service which can allow documents to be viewed in our web viewer via a generated URL. In our Outlook VSTO add-in, we'd like users to be able to send the generated URL as a link attachment, in the same manner as you can currently do in Outlook 2016 via Attach File -> Browse Web Locations -> OneDrive (etc).

我已经能够将我们的一个链接插入到包含以下内容的电子邮件中(c#):

I have been able to insert one of our links into an email with the following (c#):

Outlook.Attachment resourceAttachment = attachments.add(resourceURL, 7, 1, resourceShortFileName);

'resourceURL'只是我们为项目生成的字符串url值'resourceShortFileName'只是一个用户友好的名称,如'mydocument.docx'。请注意,对于第二个参数,
互操作中当前没有OlAttachmentType枚举条目,但将7作为整数放入该技巧。

'resourceURL' is just a string url value that we generate to the item and 'resourceShortFileName' is just a user-friendly name like 'mydocument.docx'. Note that for the second parameter there is currently no OlAttachmentType enumeration entry for it in the interop, but putting in 7 as integer does the trick.

执行此操作并发送电子邮件导致附件的PR_ATTACH_METHOD值为7(ATTACH_BY_WEBREFERENCE)。不幸的是,我们没有获得PR_ATTACH_EXTENSION,PR_ATTACH_FILENAME或PR_ATTACH_LONG_FILENAME的漂亮值。

Doing this and sending the email results in the attachment having a PR_ATTACH_METHOD value of 7 (ATTACH_BY_WEBREFERENCE). Unfortunately, we don't get pretty values for PR_ATTACH_EXTENSION, PR_ATTACH_FILENAME, or PR_ATTACH_LONG_FILENAME.

PR_ATTACH_LONG_PATHNAME填充了我们指定的网址,PR_DISPLAY_NAME拥有我们用户友好的名称,这一切都很好。

PR_ATTACH_LONG_PATHNAME gets populated with the url we specified, and PR_DISPLAY_NAME has our user friendly name, which is all good.

进一步了解附件的属性,我可以看到有一些新属性:AttachmentProviderEndpointUrl,AttachmentProviderType,AttachmentPermissionType,AttachmentOriginalUrl,AttachmentThumbnailUrl,AttachmentPreviewUrl,AttachmentOriginalPermissionType
和AttachmentIsFolder。其中,AttachmentOriginalUrl填充了我们的url,与PR_ATTACH_LONG_PATHNAME相同,这很好。但是AttachmentProviderType设置为'OneDrivePro',这可能(肯定)不是我们想要的。另外,在
电子邮件的检查器窗口中,显示了附件的小云图标或图标覆盖图。我们更愿意自定义它。

Looking further at the properties of the attachment, I can see there are a few new properties: AttachmentProviderEndpointUrl, AttachmentProviderType, AttachmentPermissionType, AttachmentOriginalUrl, AttachmentThumbnailUrl, AttachmentPreviewUrl, AttachmentOriginalPermissionType and AttachmentIsFolder. Of those, AttachmentOriginalUrl is populated with our url, same as PR_ATTACH_LONG_PATHNAME, which is good. But AttachmentProviderType is set to 'OneDrivePro', which is probably (definitely) not what we'd like. Additionally, in the inspector window for the email, there's a little cloud icon or icon overlay shown for the attachment. We'd prefer to customize that.

如果我在检查器中打开附件的下拉菜单或双击附件,我会收到"打开邮件附件"警告对话框说'你应该只从一个值得信赖的来源打开附件'。显然,我们也不希望该对话框
,但是如果我单击Open,它会成功打开一个浏览器窗口到该位置,并按照我们的预期行事。

If I open the drop-down menu for the attachment in the inspector or double-click the attachment, I get the 'Opening Mail Attachment' warning dialog saying 'You should only open attachments from a trustworthy source'. Obviously, we wouldn't want that dialog either, but if I click Open, it successfully opens a browser window to the location and behaves as we expect.

所以,是有可能通过VSTO充实我们想要的其他东西吗?它是否必须通过C ++ / MAPI完成(甚至可以这样做吗?)

So, is it possible to flesh out the rest of what we want via VSTO? Would it have to be done via C++/MAPI (Can it even be done that way?)

我们目前将我们的云存储解决方案集成到Office Online中,因此将此增强集成到Outlook中真的会与我们为客户提供的产品完全吻合。如果我们能以某种方式进入"浏览网站位置"菜单机制
,那也很棒。

We currently have our cloud storage solution integrated into Office Online, so having this enhanced integration into Outlook would really dovetail nicely into what we're trying to offer customers. If we could get into the 'Browse Web Locations' menu mechanism somehow, that'd be great too.




推荐答案

您好,

我认为这是不可能的。从Web位置附加文件是Outlook 2016中的新功能。请访问  附加
文件或在Outlook电子邮件中插入图片

I think it is impossible. Attach files from web location is a new feature in Outlook 2016. Please visit Attach files or insert pictures in Outlook email messages.

整合其他云存储Office 2013中的服务 显示如何在Office 2013中添加第三方云存储服务,但Office 2013和Office 2016中不再支持本文中介绍的云
存储功能。

Integrating additional cloud storage services in Office 2013  shows how to add third party cloud storage services in Office 2013, but the cloud storage feature described in this article is no longer supported in Office 2013 and Office 2016.

根据
[MS- OXCMSG]:消息和附件对象协议

类型: PtypInteger32 [MS-OXCDATA] 第2.11.1节)

Type: PtypInteger32 ([MS-OXCDATA] section 2.11.1)

PidTagAttachMethod 属性( [MS-OXPROPS] 部分2.592)表示访问附件内容的方式。此属性设置为以下
值之一。

The PidTagAttachMethod property ([MS-OXPROPS] section 2.592) represents the way the contents of an attachment are accessed. This property is set to one of the following values.

国旗名称

价值

说明

afNone

0x00000000

0x00000000

刚刚创建了附件。

afByValue

0x00000001

0x00000001

PidTagAttachDataBinary  属性(
2.2.2.7
)  包含附件数据。

The PidTagAttachDataBinary   property (section 2.2.2.7)   contains the attachment data.

afByReference

0x00000002

0x00000002

PidTagAttachLongPathname  属性(
2.2.2.13
)  包含标识附件的标准路径
至收件人
,可以访问公共文件服务器。

The PidTagAttachLongPathname   property (section 2.2.2.13)   contains a fully qualified path identifying the attachment To recipients with access to a   common file server.

afByReferenceOnly

0x00000004

0x00000004

PidTagAttachLongPathname  属性包含标识附件的完全限定路径。

The PidTagAttachLongPathname   property contains a fully qualified path identifying the attachment.

afEmbeddedMessage

0x00000005

0x00000005

附件是嵌入式消息,可通过
RopOpenEmbeddedMessage

ROP
[MS-OXCROPS]  第2.2.6.16节。

The attachment is an embedded message that is accessed   via the RopOpenEmbeddedMessage ROP ([MS-OXCROPS]   section 2.2.6.16).

afStorage

0x00000006

0x00000006

PidTagAttachDataObject  属性(
2.2.2.8
)  包含特定于应用程序的格式的数据。

The PidTagAttachDataObject   property (section 2.2.2.8)   contains data in an application-specific format.

afByWebReference

0x00000007

0x00000007

PidTagAttachLongPathname  属性包含标识附件的完全限定路径。
PidNameAttachmentProviderType 定义 操作附件的Web服务API。

The PidTagAttachLongPathname   property contains a fully qualified path identifying the attachment. The PidNameAttachmentProviderType defines   the web service API manipulating the attachment.

类型: PtypString [MS-OXCDATA] 部分2.11.1)

Type: PtypString ([MS-OXCDATA] section 2.11.1)

PidNameAttachmentProviderType 属性( [MS-OXPROPS] 部分2.372)包含操纵附件的Web服务类型。

The PidNameAttachmentProviderType property ([MS-OXPROPS] section 2.372) contains the type of web service manipulating the attachment.

Value

描述

OneDrivePro

OneDrivePro

网络参考附件属于OneDrive for Business业务。

The web reference attachment belongs to a OneDrive for   Business service.

OneDriveConsumer

OneDriveConsumer

网络参考附件属于OneDrive 消费者服务。

The web reference attachment belongs to a OneDrive   Consumer service.

我认为无法添加其他网络服务,例如Dropbox或Google云端硬盘作为自定义  ; AttachmentProvider。

I think it is impossible to add another web service like Dropbox or Google Drive as a custom AttachmentProvider.

问候,

Celeste


这篇关于是否可以为非MS云提供商定制PR_ATTACH_METHOD = ATTACH_BY_WEBREFERENCE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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