We have a desktop app communicating with the running PowerPoint app through COM (using NetOffice wrapper) which is able to create, modify slides and shapes in the opened document by calling COM methods. We also have a modern JS-based content add-in, which we would like to configure and insert to a specific slide from that desktop app (like a standard shape). I went through the entire object model documentation, but didn't find anything regarding the content add-ins.
So, my question is: It is somehow possible to insert a modern/JS PowerPoint content add-in (or even install it if missing to PowerPoint) using the COM/PIA API?
No, the PowerPoint extensibility model doesn't provide anything for that.
Related
everyone,
I am new to VBA and would like to know if it is possible to execute a menu button from a WordAddIn.
In the picture you can see which button I would like to execute using VBA.
Unfortunately, I can't record it via macro.
The Word object model allows executing built-in ribbon controls using the CommandBars.ExecuteMso method which executes the control identified by the idMso parameter. This method is useful in cases where there is no object model for a particular command. Works on controls that are built-in buttons, toggleButtons, and splitButtons.
But in your case the control comes from a third-party add-in which doesn't expose IDs and the CommandBars.ExecuteMso method can't find it and invoke the command programmatically.
To get the job done you may consider using the Microsoft Active Accessibility which is a Component Object Model (COM)-based technology that improves the way accessibility aids work with applications running on Microsoft Windows. It provides dynamic-link libraries that are incorporated into the operating system as well as a COM interface and API elements that provide reliable methods for exposing information about UI elements.
Also you may contact the add-in vendor for providing public methods that can be called from your solution. That's also a possible workaround instead of calling UI elements on the ribbon.
I am currently working on an PowerPoint Addin and I am currently finishing the Ribbon. I'd like to create a control to change the size of objects that looks similar to the inbuild button "ShapeWidth" and "ShapeHeight":
However, I couldn't find the correct control type and hence I built the below by myself using an editbox and buttons. Although it's working I find the other style way cleaner but I haven't found the correct type.
Not all Ribbon X (Office Fluent UI) control types that Microsoft uses in its Office applications are made available to third-party developers. This, I'm afraid, falls into that category.
You should probably be able to get the image, at least, by specifying the idMso for the built-in control.
I am trying to put custom icon to Visio Document for custom ribbon. When I using Excel I can use utility “Custom UI Editor for Microsoft Office”. For example, I can write next xml in utility and insert some picture:
Custom UI Editor
In Excel all working excellent.
But when I trying use this way in Visio, I don’t see picture on ribbon when I opening Visio-document.
After that I opening “Custom UI Editor for Microsoft Office” for Visio-document I also don’t see inserted picture that I inserted before.
Custom UI Editor after opening Visio-document
Can anyone help me out with my problem? Thank you.
This is a known issue in Visio. Custom icons in .vsdx file simply do not work.
If you are really determined to have custom pictures, you should do it otherwise.
Like via VBA macro, by writing a callback, i.e. instead of image specifying getImage pointing to some callback function to get the custom image. Or even by creating a full-blown extension.
Note - Microsoft-defined (idMso) images work fine.
I want to show a waiting dialog, in the meantime all the calculations concerning with PowerPoint objects still are running in the background. My purpose is during the time dealing with PowerPoint objects, I try to prevent the user from interfering with the UI.
It seems that there is no way to deal with PowerPoint objects in the background. Is there any workaround for my case?
Thanks
Note: I am using VS Ultimate 2013, C#, PowerPoint 2013, vsto
Office applications use the single threaded apartment model. That's why you need to use the main thread for working with Office/PowerPoint objects. However, you can extract the required information into .Net collections and process the data on another thread.
But if you need to work with PowerPoint objects, a possible solution is to display a non-dialog form with a progress bar which display the state of your actions. Thus, end users will not be able to access the UI of PowerPoint. Don't forget to specify the parent window handle (PowerPoint window handle) for the Show method (see the IWin32Window interface).
I am rewriting C++ Outlook Addin application to it full .NET representation using VSTO (Outlook 2007/2010).
One of the features to rewrite is html forms rendering. User can select checkbox, provide input, select option etc. in compose mail mode (before sending). But when I put any input markup to HTMLBody property it isn't rendered as expected. Instead only something like http://postimage.org/image/jk9swfr2t/ is rendered. I spent a very long time to search for a solution but it always ultimately turned out to be impossible due to Word based Outlook HTML render engine.
Our C++ addin code repository is extremely large and is legacy - I am not a c++ developer and don't know to much about COM and c++ outlook corresponding APIs, the target is to rewrite according to existing functionalities, there is simply no time and no resources to analize legacy code.
But the most interesting to me is that c++ version of software render everything: inputs, checkbox, select option, just everything! So I guessed it is possible and started looking for a workaround or any kind of hack.
I analyzed the old c++ addin using OutlookSpy tool and it turned out that it doesn't fill HTMLBody. I had to wade through a partial legacy code and found that it set PR_HTML MAPI property. Unfortunately I found also that this property is not available in vsto so I can't check if it helps.
So my questions are:
do you know any hacks to render HTML forms in Outlook using VSTO?
are there any differences using item.HTMLBody or PR_HTML MAPI property which can have impact on my problem?
if yes then can I set PR_HTML using C#? (I've checked free http://www.add-in-express.com/creating-addins-blog/2008/11/21/outlook-object-model-propertyaccessor-storageitem/ but it doesn't work for me - code doesn't execute when I add AddExpress.MAPI.dll)
Everything must be done programmatically so inserting using Outlook UI or exporting to Outlook from IE doesn't count. Also we can't use commercial third party tools like Redemption or Add-in Express.
Are you sure you posted the right picture? :-)
Keep in mind that Outlook uses Word to render HTML, so any input controls and scripts will not run.