Share via

Word for Mac, Error “Cannot Download” when using Office URI Scheme and moving mouse cursor

Anonymous
2016-12-28T21:55:48+00:00

When I ask Word for Mac to open a document using the Office URI Scheme, it returns an error “Cannot Download” if I move my mouse cursor.

Same URI works fine on Word for Windows.

The command I am using is:
ms-word:ofv|u|https://[myapp].azurewebsites.net/api/values/Welcome.docx

The app returns a Word document using this code:

           var filePath = "C:\\Welcome.docx";
           var source =  new FileStream(filePath, Mode.Open)
           var content = new StreamContent(source);

           var headers = content.Headers;
           headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/msword");
           var contentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment")
           {
               FileName = fileName
           };
           headers.ContentDisposition = contentDisposition;

           return content;

I need to use this implementation in an Word Task Pane Add-in. We need to open a document that our service has created back into Word.Thanks in advance.Here is a discussion on this top in Office Dev Center so far:Word for Mac, Error “Cannot Download” when using Office URI Scheme and moving mouse cursor
Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments