Share via

Loading MSword from android

Anonymous
2016-06-24T11:34:14+00:00

I am trying to load a document in MSword from my android app but can't find any documentation for the interface.  From Android Java I am calling:

Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);intent.setAction(Intent.ACTION_VIEW);file = Environment.getExternalStorageDirectory().getPath()+"/Download/101131a.docx";Uri uri = Uri.parse(file);intent.setDataAndType(uri, "application/msword");activity.startActivity(intent);

This loads MSWord, but it cant find the file.....

Ultimately I want to load the file from my OneDrive account, but don't know what to pass to MSWord to achieve this.

Can anyone help?

Microsoft 365 and Office | OneDrive | 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

2 answers

Sort by: Most helpful
  1. Anonymous
    2016-06-25T10:25:28+00:00

    At the moment I am trying to just load the file from my local storage.

    If I load MSWord and then Open -> This device > Download , I can see the file 101131a.docx and open it for editing.

    When I make the above call from my Android App, it fires up MSWord but says 'Can't open file' .

    I can only conclude that that is because either I'm not passing the file name correctly, or I have not set the correct path.

    Ultimately I want to load from OneDrive through MSWord, but wanted to check I could do it locally first, which I don't seem to be able to do.

    I would expect that to open from OneDrive, I might need to pass a more complex file location?

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-06-25T04:31:21+00:00

    Hi,

    I need more information before we proceed.

    1. Does the issue persist with the particular file/ all the file?
    2. Are you using OneDrive with browser/ OneDrive app?

    I look forward to your reply to assist you further.

    Thank you.

    Was this answer helpful?

    0 comments No comments