Closed va1729 closed 3 years ago
@Vivekananda-Athukuri apologies for the slow response, looks like this issue was overlooked until now. @weshi can you please investigate? Thanks!
Hey @va1729,
I apologize for the delay. It looks like in your sample, you're missing the .bindings property. I've changed the second function in your sample to the following:
function run2() {
Office.context.document.bindings.getByIdAsync("myBinding", function(asyncResult) {
if (asyncResult.status == Office.AsyncResultStatus.Failed) {
console.log("Action failed. Error: " + asyncResult.error.message);
} else {
console.log("Go to binding with type: " + asyncResult.value.type + " and id: " + asyncResult.value.id);
}
});
}
The above snippet will now search for the binding with the "myBinding" id and can successfully log the type and id to the console:
Closing the issue for now, please feel free to re-open if you have any further questions.
Steps to Reproduce, or Live Example
Script lap scripts -
Context
I am trying to make the cursor go to a particular binding. The function
goToByIdAsync
takes me to the binding but the callback is never fired in Office Online. It works in Mac Word app though.Your Environment