Is PowerPoint automation from Excel possible with Office Add-Ins? - vsto

I have a VSTO add-in for Excel that automates PowerPoint, creating new presentation documents and generates slides and other content based on the data in the current Excel workbook. (Using the Primary Interop Assemblies, it creates a new instance of the PowerPoint Application, adds a new Presentation object, Slide objects etc.)
Is it possible for a new Office Add-in to do this so it would run in Excel online, on the Mac, and so on?
It looks like I can get the context of the Office application I'm currently in (e.g. Excel), but I don't see how I can reference the PowerPoint object model, or automate anything outside of Excel itself.
Is this what Microsoft means when it says to create a VSTO add-in
"...or to extend Office 2013 and Office 2016 beyond what's possible
with Office add-ins. VSTO add-ins run only on the desktop."
rather than building a new JavaScript/HTML Office Add-In?
Thanks.

No, it is not possible. Web add-in are on different platforms like Mac where the COM automation technology doesn't exist.
Instead, you may consider using the Open XML SDK instead for generating PowerPoint files on the fly from your Excel web add-in. See Welcome to the Open XML SDK 2.5 for Office for more information.

Related

How to interact with the 'Microsoft Dynamics Office Add-in' by VBA

In order to set up an automation of data refresh task, I would like to use VBA to ask the add-in "Microsoft Dynamics Office Add-in", to refresh and then refresh the power query connections to this file, and then move to the next one.\
I have tried to record a macro but VBA won't detect the button within the add-in pane that I clicked;I have also tried to reference to the add-in, however this add-in wasn't showing up, neither in the project explorer nor the references list.\
Is there a way to create VBA against this add-in? I have read the article at:
https://www.exceltip.com/custom-functions/how-to-use-your-excel-add-in-functions-in-vba.html
about how you set a reference but I could not even spot the add-in at the first step.
If it is not possible to get access to this add-in via VBA, is there any other methods to do for such automation task?\
Thanks!

vsto and office web addin in same ribbon tab

Is it possible to add buttons from two different addins (one office web addin, and the other VSTO addin) in the same custom ribbon tab in office 2016?
If yes, how?
I don't think so, but this should be something you can determine by a quick test. Define a tab/button in VSTO and then define an Add-in Command for the web add-in and use the exact the same name for the tab in the manifest of the web add-in. I suspect you'll get a two tabs with the same name.

"VBAProject" name conflict

My issue involves PowerPoint Add-Ins all being named VBAProject.
Microsoft Office Pro Plus 2010 - PowerPoint 2010 32 bit
Running Windows 7 Pro SP1 64 bit
I have several add-ins for PowerPoint saved as .PPAM files. In any PowerPoint file I can (or should be able to) link add-ins to extend that presentation's functionality. Each .PPAM file is named differently. In the VBA IDE however, in the list of references, each add-in is called 'VBAProject'. There are multiple entries of 'VBAProject' each one showing a path to a different .PPAM file. The problem is that I cannot add a reference to more than one add-in because the same name assigned to each of these; VBAProject. This results in a name conflict. Using the add-in manager from PowerPoint design view I can see all the selected add-ins as being 'active'. The Add-in manager for the VBA IDE shows no Add-ins.
Questions:
Is the naming of PowerPoint Add-ins as 'VBAProject' expected for every add-in?
Is there a way of change the name 'VBAProject' to something unique and hence avoid the name conflicts?
So it seems as if I have found the solution to my problem and would like to share it with the community. It involved a small change to the registry. [Be careful when dealing w/ the registry and make a back-up prior to any changes.]
From Regedit.exe -> HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\PowerPoint\Options. Change value of DebugAddins from 0x00000000 (0) to 0x00000001 (1).
With this done you will be able to see all the add-ins in the VBA IDE and from there you can change the name 'VBAProject' to something unique.

Permanently append Customized Ribbons to PowerPoint file

I have written 2 Macros in PowerPoint and added the Macros to a customized ribbon named 'My Ribbon' to make those macros available at a click of a button. The only problem is the Ribbon disappears when someone else opens the PowerPoint on a different computer. The macros stay with the file but the customized ribbons do not and we have to create another customized ribbon, and place both macros to the ribbon every time we share the file across our drive.(Which is quite annoying)
I want to permanently append the customized ribbon to the PowerPoint so that anyone who opens the PowerPoint will be able to see the personalized ribbon with both Macros already on their version of PowerPoint.
VBA macros are not designed for distributing the code on multiple PCs. If you need to get a solution which can be installed on other PCs you need to develop an add-in. That's exactly they were invented for. Moreover, you can create an installer for the add-in. It will be installed as other applications on your PC. See Walkthrough: Creating Your First Application-Level Add-in for PowerPoint to get started.
If you choose to stay with VBA macros, you will have to edit the open xml document. See Customize the Word Ribbon User Interface for more information. The process is common for almost all Office applications (Outlook does't support that).
You could use such a program like Ribbon Editor to customize the Ribbon for your pptm file only. (No need for an AddIn it you want it deployed only with the file)

VBA Application Migration from Office 2002 to Office 2007

Looking for Migration from Office 2002 - VBA Word Doc Application to Office 2007.
Issues: Though Office 2007 Supports VBA Application - VB Macro Code, Menu Bars are not appearing. Indeed, VBA Macro Menus display under "Add-ins".
On a study, I realized Office 2007 Supports XML - Ribbon. Is there any ideal approach to migrate VBA Macro Application to Office 2007?
Your best bet would be these two MSDN articles: Customizing the 2007 Office Fluent Ribbon and Creating a Custom Tab by Using Ribbon XML, although they look like they focus on doing it across all applications, rather than just one. There help docs for each Office app, to get them all try this Google query: site:msdn.microsoft.com office 2007 add button to ribbon.
This snippet, from the first link, should be what you're looking for:
What About Existing Solutions?
In previous versions of Office, developers used the command bars object model to build the Visual Basic code that modified the Fluent UI. In the 2007 release of Office, this legacy code continues to work in most cases without modification. However, changes made to toolbars in Microsoft Office 2003 now appear on an Add-Ins tab. The type of customization that appears depends on the original design of the add-in. For example, Office creates a Menu Commands group that contains items added to the previous menu structure (such as the File menu, the Insert menu, and the Tools menu). Office also creates a Toolbar Commands group that contains items added to the previous built-in toolbars (such as the Standard toolbar, the Formatting toolbar, and the Picture toolbar). In addition, custom toolbars that are added by an add-in or document appear in the Custom Toolbars group on the Add-Ins tab.