0

I have searched through and as a final resort i am heading to the experts here.

I would like to know if the below are possible or may be possible in future roadmap

  1. Expected date for Document.open() to available ? 2.Is there any way to open and edit(in office online) a document which is in One Drive.
  2. Can we execute any addin functions as soon as the document is opened without actually launching the addin ?

Thanks Ahmed

AhmedVali
  • 185
  • 2
  • 16

2 Answers2

1

There is no such event as of now, please vote in our userVoice channel.

That been said, you have one alternative for this, it’s called our auto open task pane feature.

https://learn.microsoft.com/en-us/office/dev/add-ins/design/automatically-open-a-task-pane-with-a-document

You need to open a task pane though, but Please give a try and give us feedback.

Juan Balmori
  • 4,898
  • 1
  • 8
  • 17
  • Hi Juan, Thank you for taking time to answer the question. But I dont want to open a task pane, I need to invoke a function. I have one more doubt here, if i write my function to be executed in document.initialize() will it be executed on startup ? – AhmedVali Feb 24 '18 at 11:23
  • Hi, one more question when will document.open will be available in CDN . I think it is still in beta right ? – AhmedVali Feb 24 '18 at 11:29
  • document open is in PRODUCTION CDN now. You can add a method in your add-in initialization and then do the operations you need. you have to launch the taskpane of course, using the technique i described above. – Juan Balmori Feb 27 '18 at 20:32
1

Another alternative is using graph to reach out to the file and make some editing.

Here is the reference.

https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/excel

Let us know if it fulfilled your requirements.

Shawn Niu
  • 36
  • 2