Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening Office-Document via ms-word:ofe on iPad

I have a WebDAV-Server that provides resources like e.g. Office-Documents.

Our small web client provides the possibility to open and edit this documents by using the office URI scheme (e.g. ms-word:ofe).

For example when you click on a link ms-word:ofe|u|[domain]/[pathtofile] Microsoft Word opens the requested document and the user is able to edit, save and so on. Works fine on Windows Desktop.

Now I tried to use the same link in Safari on an iPad to open the document in the installed word app. The browser requests to open this file in this application. The app starts but aborts opening the document by an error-message Cannot Connect to URL. Please use a valid URL.

Some weird facts: I tried to open a Document thats located on an other WebDAV-Server. The hyperlink ms-word:ofe|u|[DOMAIN]/Pers%C3%B6nlich/doc.docx works. But when I rename the folder the file is located to ms-word:ofe|u|[DOMAIN]/Pers%C3%B6nlich**e**/doc.docx the app aborts with some other error-message.

Now I'm confused and need help with it ;)

Thanks for any hint!

like image 954
Robert Avatar asked Jan 18 '26 03:01

Robert


1 Answers

It's not possible to do that.

For the ms-word url scheme to work, the document must live in SharePoint or OneDrive, stated here

You can enable users who are running Office on an iOS device to open and edit files stored in SharePoint or OneDrive from any application, and then quickly return them to the original application when they’re done editing the file.

The closest thing to what you want to do would be to create a UIDocumentInteractionController. However this would only allow your users to use the document in read-only mode, but they can duplicate it to edit it. That duplication will only be available inside ms word.

AND UIDocumentInteractionControllers only work for local file paths, so you would first have to store that document from your server onto the phone, then open it from the phone using the documentInteractionControlller, then, if you want, delete it from the phone so that there's no used up memory left over.

like image 152
LuKenneth Avatar answered Jan 20 '26 18:01

LuKenneth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!