I'm writing a PowerPoint content addin using Office.js API. I need to obtain PPTX file right after user enters Slide Show mode (see bottom of this post for why I need it).
I'm doing this using Document.getFileAsync API, as described in the docs. The problem is that it doesn't work in Slide Show mode in PowerPoint Online.
That is, the file gets successfully obtained in all following cases:
Desktop PowerPoint 2016, Design ("edit") mode;
Desktop PowerPoint 2016, Slide Show ("read") mode;
PowerPoint Online, Design ("edit") mode.
However, PowerPoint Online in Slide Show ("read") mode returns an error with message "An internal error has occurred" as a result of Document.getFileAsync call.
Is this a bug or intended behavior? What can I do to obtain the file in Slide Show mode in PowerPoint Online?
I need to obtain PPTX file because uncompressing and parsing it seems to be the only way to determine index of the slide that contains the particular addin. See my other related question. I need to do this in Slide Show mode because, in Design mode, user can re-order slides any time, and the addin doesn't know if and when it happened; also, addin might be initialized only in Slide Show mode, e.g. when user opens the presentation and enters Slide Show mode right away.
Related
Operation system: Windows 10
MS Office version: 2019 64-bit
I am trying to create an MS Office web add-in which allows me to place different html pages to different slides. While reading different parts of the MS documentation and web-searching, I could not understand how to:
Center the so-called Taskpane in the center of a slide after start
Insert a web object with an option to show some website content (including js) WITHOUT errors connected to MS Office safety
A good example is a Plotly D3.JS Charts. I try to do practically the same but with support of loading local html files.
UPD: I know about LiveWeb, LiveSlides and other solutions. However, they have their own security problems - I have to correct regit. Therefore, please, do not propose them.
The task pane in an Office Web Add-in always opens to the side of the Office application window. You cannot configure it to open in the center of the document. Also, you cannot have separate task panes for each slide.
I am developing a VSTO application for Outlook client. I am trying have my form open in the part of the Outlook client window which is highlighted in red in the following image:
I think I can't use the form regions because they replace the view for a single item.
So basically what I want to do is opening my custom form (windows or web) in the red area when I click my tool's button on the toolbar.
Any ideas how this can be done?
There are three main ways for displaying your own form there:
You can use the WebViewURL and WebViewOn properties of the Folder class for setting a web view state for the folder. Microsoft Outlook uses the rendering engine of the version Windows Internet Explorer installed on the client computer to display the web page. If Internet Explorer is not installed on the client computer, Outlook will not display the web page.
Create an adjucent Outlook window. See Creating Adjacent Windows In Outlook for more informaiton. Note, you need to have a deep understanding of Windows API to move that way, see SetWindowsHookEx.
Add-in Express provides a layout for the form out of the box. There is no need to invent a wheel in that case.
You will need to get down to the HWND level to insert your UI - see https://blogs.msdn.microsoft.com/stephen_griffin/2010/06/01/adjacent-windows-in-outlook/ and https://code.msdn.microsoft.com/OlAdjacentWindows/
I create new PowerPoint Content web add-in.
I want use add-in behind a text. For this I make for add-in "Send to back" and for text make "Bring to front". But in slide an add-in stay always on top see attached image.
Notice: in preview panel arrange works but in slide not. In slide show mode (F5) also not works.
PowerPoint version:
That's a known issue. Content Add-ins (Agaves) do not participate in the Z order within a slide.
I'm writing a PowerPoint content addin using Office.js API. I need a way
for each instance of that addin to determine the index of the containing
slide, or, if this is impossible, the visibility state of the addin (i.e.
whether the containing slide is currently visible on screen).
The documentation suggests
no API specifically intended for this purpose, so I've been using
the following method:
Upon addin initialization (inside Document.initialize callback),
request currently selected slide using Document.getSelectedDataAsync
method.
Since addin cannot be initialized until it is visible, we can be almost
sure that the index obtained in the step 1 is the one of the containing slide
(unless the user was fast enough to change the slide while
getSelectedDataAsync was doing its async communication).
However, the assumption made in the step 2 has proved to be wrong. It holds
for PowerPoint Online, but desktop PowerPoint behaves differently.
Specifically, in slide show mode, if the slide next to the currently displayed one
contains an addin, and that addin is not yet initialized, it gets pre-initialized
despite the fact that it is not visible/active. And in all such pre-initialized
addins, Document.getSelectedDataAsync returns the index of the slide that is currently
displayed, which is not the one that contains the addin.
So the question is: is there a way to more or less reliably determine the containing
slide index, the way that works in both web and desktop versions of PowerPoint?
If no, here's the second question: is there a way for an addin to determine whether the containing slide is currently visible on screen in slide show mode?
I've found one that works in PowerPoint Online (checking window.innerHeight in
slide show mode), but it relies on internal implementation details that are
subject to change any time, and, most critically, it doesn't work in desktop
PowerPoint.
Desktop PowerPoint seems to display each addin in a separate window (as
window.parent equals window), and I failed to find an API or workaround that
would allow to tell whether the window is currently visible.
Page Visibility API
seems to fit this purpose perfectly, and it is even implemented in IE11, but
it doesn't work inside PowerPoint (visibilitychange events don't fire,
document.visibilityState always equal "visible", even if the addin is
on a currently hidden slide).
At present, the PowerPoint client seems return the active slide instead of the parent slide since the function “getSelectedDataAsync” is asynchronous.
is there a way to more or less reliably determine the containing slide index, the way that works in both web and desktop versions of PowerPoint?
As far as I know, there is no API to return the slide which contains the content app. And if you want the Office add-in support this API, you can submit the feedback from here.
While editing a PowerPoint document, I select a slide with bullet points then click Slide Show - Animation Schemes. I select the Appear and dim scheme, but the selection doesn't "stick" - the active animation scheme still shows as "No Animation".
I've verified that the "Show Without Animation" option is NOT checked. What else would cause this behavior?
As it turns out, the PowerPoint presentation file I was working on, which had been passed on to me from someone else, was originally set up using a template from a later version of PowerPoint. Apparently, that version had settings that were not accessible in PowerPoint 2003, so it just didn't work.
Fortunately, we'll be joining the modern world of MS Office soon and won't be dealing with this kind of problem.