OneDrive for Business and Outlook 2016

Add-in Express™ Support Service
That's what is more important than anything else

OneDrive for Business and Outlook 2016
 
Petko Iliev




Posts: 7
Joined: 2017-01-11
Hi,

We are developing Add-in for Outlook that should offload attachments by reference(olByReference) to specific server before sending email. Currently we want to add support for Outlook 2016

Till now everything worked correctly but when there is OneDrive for Business and Office 2016 situation we are experiencing the flowing issues:

OneDrive adds information in mail body.

https://social.msdn.microsoft.com/Forums/getfile/986363

There are options in the attachment dropdown menu that are also not related to our attachments

https://social.msdn.microsoft.com/Forums/getfile/986364

Also there is cloud icon on our attachments.



Can you tell us whether if there is a way to send attachments by references and not interfere with OneDrive.


Steps to reproduce:
1. Install Outlook 2016 and OneDrive for Business
2. Start Outlook and compose mail with attachment.
3. Open attachment drop down menu verify there is "Change Permissions" option.
4. Send the mail. (For example to yourself)
5. Receive the mail and open it.
6. Verify there is link to the attachment from OneDrive in the mail body.
Posted 11 Jan, 2017 06:26:15 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Petko,

I'm not sure that I understand the issue. Is the issue reproducible if you disable OneDrive for Business' Outlook add-in? Are you saying that this add-in adds unexpected things to the email? Check if the add-in provides settings that you can request your users to set.


Andrei Smolin
Add-in Express Team Leader
Posted 11 Jan, 2017 09:12:22 Top
Petko Iliev




Posts: 7
Joined: 2017-01-11
Hi Andrei,

Sorry i have missed some steps to reproduce.

Steps to understand the problem:
1. Install Outlook 2016 and OneDrive for Business and our Add-in
2. Start Outlook and compose mail with attachment from our add-in.
3. Verify that the attached file has cloud icon.
3. Open attachment drop down menu verify there is "Change Permissions" option.
4. Send the mail. (For example to yourself)
5. Receive the mail and open it.
6. Verify there is link to the attachment from OneDrive in the mail body( but this should not be counted as OneDrive attachment).

Our issue is that our Outlook Add-in use the same olAttachmentType as the OneDrive.


mailItem.Attachments.Add(filename, OlAttachmentType.olByReference, 1, displayName);


In the event handler for the BeforeAttachmentAdd event we receive attachment type = 7
And in Outlook 2016 the OneDrive attachments are the same type (7)

The attachment types are the following:


        olByValue = 1,
        olByReference = 4,
        olEmbeddeditem = 5,
        olOLE = 6



We can't use other attachment types except olByReference, but it is now taken as OneDrive attachment.


Please, advise us on how to resolve the problem.
Posted 11 Jan, 2017 09:35:05 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Petko,

Please capture a video demonstrating what you expect to get and what you get instead. Make sure the video demonstrates the problem with attachment types. Send me the video(s) to the support email address; find the support email address in {Add-in Express installation folder}\readme.txt and make sure your email contains a link to this topic.

What Outlook build number are you using?


Andrei Smolin
Add-in Express Team Leader
Posted 11 Jan, 2017 10:29:49 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Petko,

Thank you for sending use the videos.

Although I have OneDrive for Business (it looks so) I don't know how to get it work in my Outlook 2016. This doesn't let me understand something. I'll continue my attempts to recreate the environment and reproduce the issue. But for now I'd like that you help me better understand the issue.

I see two possibilities: 1) there's an add-in related to OneDrive for Business and 2) there's no such add-in and the behavior you see relates to Outlook itself. Please check the list of add-ins loaded in Outlook 2016 to find whether such an add-in exists or not. Anyway, there may exist settings that could help you solve the issue. The settings can be provided by the add-in or by Outlook. Could you check is such settings exist? And, in case there's an Outlook add-in related to OneDrive for Business, what is its ProgId and what is the ProgId of your add-in?

Could you also explain about Attachment.Type? Are you saying it returns 7 for you despite the OlAttachmentType enum not having this value?


Andrei Smolin
Add-in Express Team Leader
Posted 12 Jan, 2017 07:23:13 Top
Petko Iliev




Posts: 7
Joined: 2017-01-11
Hi Andrei,

There is no OneDrive Add-in. It look like this is Outlook 2016 new feature.
I also checked if there is a setting that can help us, but I found nothing.
The problem is that our attachment type is the same as OneDrive attachment type.
OlAttachmentType.olByReference is no longer supported since Microsoft Outlook 2007, but our addin was working perfectly till Outlook 2016 and OneDrive for Buissnes
Outlook 2016 introduces a new type (ATTACH_BY_WEB_REF(7)) for the PR_ATTACH_METHOD property, but there is no new corresponding in the Outlook Object Model. OneDrive attachments in Outlook 2016 use that new type.

Please, be informed that we have premium license for support and we need to resolve this issue because it is very critical for our business.

Please, for your support in order to resolve the problem.

Thank you!
Posted 12 Jan, 2017 08:33:39 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Petko,

I've found that for a OneDrive-based attachment, Attachment.Type in my Outlook 2016 returns 7!

I've also found that depending on the value you pass in the second parameter of the Attachments.Add method, the attachment is added either as a regular attachment or a web reference (see below). If the attachment is added as a web reference, Attachment.Type of the newly added attachment is 7, and the attachment icon also displays the cloud mini-icon. anUrlOfFile below can be an URL to an arbitrary location (can be a non-OneDrive URL)

mail.Attachments.Add anUrlOfFile, 1 - regular attachment
mail.Attachments.Add anUrlOfFile, 4 - web reference
mail.Attachments.Add anUrlOfFile, 5 - regular attachment
mail.Attachments.Add anUrlOfFile, 6 - regular attachment
mail.Attachments.Add anUrlOfFile, 7 - web reference

Whether an attachment is added as a web reference or as a regular attachment, the body of the email sent/received doesn't contain any extra text. Are you sure that the extra text shown in your video is added by OneDrive and not by your add-in?

Petko Iliev writes:
Our issue is that our Outlook Add-in use the same olAttachmentType as the OneDrive.


If this conclusion were correct, it would mean that you guys have developed an add-in which uses this olAttachmentType exclusively for yourself. This is why I can't regard this statement as correct. Most probably, the issue is the consequences of having the same olAttachmentType value. If you accept this approach, please describe the consequences. I suppose one of them is the cloud mini-icon drown over the attachment icon. Correct?

As to the text added to the body, I currently think it somehow relates to your add-in and not to Outlook.


Andrei Smolin
Add-in Express Team Leader
Posted 12 Jan, 2017 10:33:35 Top
Petko Iliev




Posts: 7
Joined: 2017-01-11
Hi Andrei,

We have tested it with all possible values and the result is the same - the attachment is marked as OneDrive.
1. Please let us know if there is a solution to solve the problem.
2. Can we sign some functions to the "Change Permission" Drop Down oprions? Currently those options has no function.

Thanks!
Posted 13 Jan, 2017 03:26:46 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Petko,

At the moment I don't see a way out of this.

Petko Iliev writes:
Can we sign some functions to the "Change Permission" Drop Down oprions? Currently those options has no function.


I don't understand. Could you please reword this?


Andrei Smolin
Add-in Express Team Leader
Posted 13 Jan, 2017 03:43:32 Top
Petko Iliev




Posts: 7
Joined: 2017-01-11
Hi Andrei,

We understood that there is no solution for point one (1. Please let us know if there is a solution to solve the problem.). Please confirm.

For point two(2. Can we sign some functions to the "Change Permission" Drop Down oprions? Currently those options has no function.):
Can you please open the video(OneDriveAndOutlook2016.mp4) I sended to you yesterday from 0:19 second to 0:23 second.

Thanks!
Posted 13 Jan, 2017 03:59:00 Top