I'm just wondering if it's feasible to create interactive custom element for PowerPoint and add it to presentation programmatically using OpenXml for example.
For instance, we can insert a picture on a slide. So, I want to insert a picture on the slide and be able to change size, colour or shape right in playing mode.
Another example, I want to have buttons on my presentation and be able to click on it to get some action done, again, right in playing mode. In other words, I want to make my presentation interactive during the playing mode.
The first thing that I came up with, is using VSTO to create a plug-in, however as far as I know VSTO and OpenXml give an opportunity to play with XML structure and that's it.
Maybe I googled it incorrectly and used wrong keywords but I've found nothing
UPDATE
One of the possible ways that it can be done with (I think so) is adding a custom object, like excel spreadsheet. However, in presentation mode, it's not interactive either.
VSTO can create COM add-ins that work with the PowerPoint object model directly; you don't necessarily need to do anything with XML.
You can also create add-ins using the VBA that's built into PowerPoint or distribute presentations that include VBA.
A VSTO or VBA add-in solution would require that the user install your software, which may or may not be practical in your situation.
VBA in the presentation file itself, saved as a PPTM rather than PPTX, could probably do all that you want to do. It would require no special installation, but the user's security settings would have to permit macros.
Anything that involves a code solution would need to be permissible under the user's or enterprise's security restrictions, of course.
While you can't change picture size etc in slideshow mode, you can add action buttons that add some forms of interactivity to your presentation; these require no code at all. It's a built-in PPT feature.
Related
I'm working with office vsto add-Ins c# and looking for a way to differentiate between auto-save and regular save events. As far I know, there doesn't exist a separate event for auto save. Based on the event type, I would like to have separate workflows. I find the documentation regarding auto save and vsto to be very minimal and couldn't find anything relevant. Any reference or a work around would be highly helpful. Thanks in advance.
There is no way to differentiate save operations. For example, if another add-in calls the Save method and auto-save operations will be treated the same.
The best what you can do is to repurpose ribbon controls when the user clicks the save button on the Outlook UI. See Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.
If you don't want to overwhelm your backend with multiple requests, you can perform your DB operation only when the inspector where the item was edited is being closed and the item was modified.
As example, I want make simple resizer, where you can select image in explorer and set new dimensions.
It is not possible to modify the Windows Explorer 8 ribbon.
However, add-ins will not be able to plug into the ribbon UI. This was
a difficult engineering choice for us and we expect that many of you
will read this and suggest we add the capability--of course if we
could get it right this time around we would have done that. A big
part of this blog is sharing these choices--tradeoffs--between new
features and adding everything we can dream up and finishing. We also
think the customization we provide and the improvements are worthwhile
this time around.
From here.
I'm trying to do something that I'm not sure is possible.
I want to use a .net 3rd party library that gives nice winform chart controls, to replace some (very complex and ugly) VBA generated charts in an Excel worksheet.
I'm using Excel-DNA (which is great BTW), and I managed to do all sorts of things with it, like displaying Winform forms in both sync and async way (thanks to https://github.com/Ron-Ldn/DotNetRefEdit)
So far, I managed to make my non modal form with the charts appear when I activate a particular worksheet, and by setting it's parent and topMost properties, it kinda have the expected behavior. But placing it is a real pain (different screen sizes) and I was wondering if there is a way to properly do it
So here's the question : Can I attach in some way a .Net form or a custom control to a worksheet, maybe even have it positionned relatively to a particular cell ? It must be non modal and it will display only if we are on a particular sheet.
I know with VSTO you could add a control to a worksheet, but I don't want to use VSTO. I also know that I could probably create my own ActiveX control and have it registered, and then place it in Excel like I would with another button control for example, but that seems hazardous according to what I read about it
Thank you for all ideas or suggestions
Consider creating a custom task pane (CTP) pinned to the right hand side of the Excel workbook (worksheets).
For more information on how to do this in ExcelDNA, see ExcelDNA GitHub Sample on CTP.
I am updating a Windows Forms application that was written for Office 2003. It would open Word, populate it with text from the database, create buttons appropriate for the user's security roles, and handle button clicks. The old way was with CommandBars. The Word documents created this way were stored as DB Blobs, so they were only ever available via the Forms application. That is the functionality I need, but without CommandBars.
Now, we have the Ribbon, Action Panes, VSTO, and OpenXML. I know my way around C#, but I'm new to all of these technologies.
I imagine a solution where I set up a template with the proper buttons on a nice ribbon, and the buttons raise events. If someone just tried to use the template by itself, there would be no data and the events would do nothing. But my Windows Form could create a new document based on the template, populate it with text from the database, hide inappropriate buttons, and handle button click events. Easy peasy.
I began by adding a Word 2010 Template project and making a ribbon for it. It looks nice in the debugger. But, I can't create a new document with it from a Console app. Word launches, but the ribbon isn't there. There's a note in the documentation that "If a Microsoft Office Word template has managed code extensions, the project assembly is not called if the template is attached as a global template or loaded from the startup directory of Word. In addition, the document does not recognize the format of a template that is part of an Office solution." I believe this means my template is useless. I can't open Word and make a new document with my template or call the template from another project, so, pointless.
All the MS help has failed me, and mostly leads me in circles. I need some direction. For each piece of the scenario I described, what is the most appropriate modern technology? For each technology I need to use, what is the best resource for my situation?
The quick overview is I have an Excel AddIn targeting Excel 2013. The AddIn has a custom RibbonUI that contains a couple of read-only EditBoxes that contain workbook specific values. The same AddIn works fine in Excel 2007 & 2010, with the MDI interface, but with 2013 and its SDI interface.
With a simple VSTO AddIn, I've added a simple RibbonUI with an EditBox. For testing purposes, I'm just trying to get the EditBox to reflect the Workbook.Fullname of the window in which it appears. Far as I've been able to find, the RibbonUI is a singleton and there's no apparent way to control the values of any edit controls on a per workbook/window basis. If I have 2 Excel Workbooks open and switch back and forth (updating the value on the ActiveWorkbookChanged property of the Excel.Application), both workbooks always reflect the most recent value. Worse yet, only one event fires, but both windows are updated.
The crux of the problem is that I cannot find a way to control in a per window/workbook manner the value of an edit control. I found Programming for the Single Document Interface in Excel 2013, except it doesn't mention, or provide any references on how to do it, just that you need to.
I'll try and update later with some examples, but I'm wondering if anyone has solved this problem with SDI under Excel 2013? It is obvious looking at built-in Ribbon controls in 2013 that is is possible to do this (for instance, Font settings), but documentation seems exceptionally sparse on how to accomplish something similar from a user AddIn.