Is there a way to know if a powerpoint shape is selected by the user? - powerpoint

I'm creating an addin on powerpoint using office-js and I don't know if there is a method to check if a shape selected by the user ?
I know that in vb.net it looks like this :
Dim shape = selection.ShapeRange.Item(1)

Unfortunately, there is no way to do this in Office.js at this time. It is a good idea. Please consider suggesting it at Microsoft 365 Developer Platform Ideas.

Related

Shape property "decorative" not in VSTO?

I program PowerPoint add-ins both in VBA and in VSTO. In VBA I can use shape.Decorative to check, if a shape is decorative - and therefore does not need an alternative text. In VSTO however there is no such property.
I'm using Visual Studio 2022, the reference to PowerPoint is set to version 15.0.0.0.0 - but I can't see where I could change that. Am I using the wrong template?
I'm grateful for any tips how to get to that attribute. Thanks in advance, Sabina
The PowerPoint object model provides the Shape.Decorative property which sets or returns the decorative flag for the specified object. So, it doesn't matter whether it is a VSTO add-ins or VBA macro. The PowerPoint object model is common for all programming languages. In this situation you can:
Use a newer PIA to get access to the property (with intellisense suggestions).
Use the late-binding technology to invoke the property programmatically even when it is not available in PIAs. The Type.InvokeMember method invokes a specific member of the current Type.

Replacing the "person" that links as contacts icon with another icon in MS Outlook

I was assigned for a client that needs and Outlook add-in and apparently, I don't know where to start but the client said that he wants that dollar icon to replace the person icon to create another function. I was wondering if that's possible, I mean, that has been pre-defined by the Microsoft team and they are the ones that have the source code. How am I supposed to do that?
PS. Sorry for bad english
Alright. I think I figured this out a little. I found a documentation of Microsoft here.

Outlook Email Template With Input Box

I wonder whether someone could help me please.
Firstly, I'm not even sure whether this is possible but I thought I'd ask.
I have a serious of Outlook Email templates which I want to adapt so that the operator can enter a recipients name, a user name and password.
Could someone tell me please whether this is possible and if so, how I would go about developing this.
Many thanks and kind regards
Chris
Outlook doesn't provide anything for that out of the box. But you can develop a VBA macro or COM add-in which can get the user's input and paste it to the email where required. See Getting Started with VBA in Outlook 2010.
You may find the How To: Create a new Outlook message based on a template article helpful.

How do you make an add-in for Excel 2011 (Mac)

I would like to add a button to the Ribbon and have it perform some basic tasks when clicked. Is this possible? If so, how?
Thanks in advance.
No, it is not possible. It looks like it is possible, but it is not. The only proper add in for Excel 2011 Mac is provided with Excel, and the ability to show it in Excel Mac's ribbon is apparently hard-coded into the Excel Mac application. None of the XML-based techniques for extending the Excel Mac ribbon work because the ribbon is hard-coded. It looks like the Windows version, but it is nothing like it.
Obviously, it is hard to provide sources for a negative answer. I have researched this topic carefully including contacting Microsoft support, and found that there is no compiler or IDE from Microsoft for this purpose. You can certainly develop in VBA in Excel Mac, and you can make an XLA add-in, but you cannot access the ribbon. You can create little square Mac toolbar icons, just as in Excel 98.
Here are some useful links that will answer your question:
how to customize the ribbon
how to customize the ribbon with vba
how to create an add in (on MSDN)
a clearer tuto on how to create an addin
Please ask a more precise question if you want more precise help.

How to access chart in PowerPoint via VSTO?

I am trying to access charts in slides in PowerPoint 2007 via VSTO, and I am a bit confused. While the Interop provides a property Shape.HasChart which properly finds shapes that have/are charts, I can't figure out how to access the Chart object itself. I don't see a chart property on the Shape. Am I supposed to cast the Shape to a specific type?
Looking into the documentation, it seems that charts were not well-supported initially in Office 2007, but it's not clear to me whether there is a way to access the Chart and do things like change the title or the axis. Any pointers would be highly appreciated!
You need to access the OLEFormat.Object of the Shape.
Graph.Chart aChart = (Graph.Chart) pptSlide.Shapes[1].OLEFormat.Object;
aChart.Activate();
I can do this successfully with Office 2003.
I goggled a bit and apparently with 2007 SP2 there is a way to get a your shape object a .Chart property. I do not have 2007, so I can not test this.

Resources