Copy to clipboard button for Powerpoint - vba

I embedded a Powerpoint slide to Sharepoint. It is some kind of guide where you can click on stuff and go back with hyperlinks. There is a front page where you can click hyperlinks to go to slides A, B and C. Unfortunately embedded slides do not allow CTRL C. I would like to create a Powerpoint macro and then assign this to a button, where clicking would copy the TextA on Slide A to user's clipboard.
I tried recording macro on excel and then using it on Powerpoint and it did not work. I'm also curious even if I got the right code for the macro, would it work on an embedded slide? Hyperlinks work.

Related

VBA for Powerpoint: Change Slide in One Powerpoint by Selecting Button in Another

I am a beginner at VBA.
I am designing a somewhat interactive Powerpoint presentation/s. I want to be able to have three separate Powerpoint presentations open that will link together. I have been trying (without success) to create, in VBA, code which will change the current displayed slide on one Powerpoint file by clicking a button in another. I can hyperlink to the set slide but this causes this slide to pop up on the same screen in which it is clicked, despite it being already open in another screen (I don't want this).
Thanks in advance for any help,
Holly
VBA uses an object model that is a huge hierarchy of attributes and functions that represent the application. You can use this model to view and update attributes to get text, resize, and modify the application. You should look at some tutorials to get you started. When editing your code, you can press F2 to see and explore this object model. You can press F8 to run your code line by line (debug mode) and see what is happening.
To your question, you can access the open presentations in the application.presentations object (https://learn.microsoft.com/en-us/office/vba/api/powerpoint.presentations). You could then use a presentation in that list and use the ActiveWindow.View.goToSlide function (https://learn.microsoft.com/en-us/office/vba/api/powerpoint.view.gotoslide). Here is a free tutorial that I've used in my VBA journey (https://www.tutorialspoint.com/vba/index.htm).
PowerPoint has a Presentations collection that contains all currently open presentations. You can get a reference to any of them via Presentations("name") where "name" is the filename of the presentation, sans extension.
So ... assuming you've got three presentations open, a.pptx, b.pptx, c.pptx you can do something like this:
Sub SlideChange()
With Presentations("c")
.SlideShowWindow.View.GotoSlide (3)
End With
End Sub
If you run the above in any of the presentations, it will change the slide show window displaying presentation c to the third slide.

How do I disable the cut button on excel 10 ribbon

I am trying to disable the cut function/button on the ribbon. I have a situation where there are a number of formulae that are reliant on data input cells. If those cells are cut and pasted elsewhere the formula follows the cell. I have disabled right click and keyboard shortcut but cannot disable the ribbon cut function. I downloaded a spreadsheet from another thread with a similar requirement which had no cut button on the Home ribbon but cannot see any code to show how it was achieved. Soooo! If anyone can help it would be awesome.

Embed a linked copy of a slide from other Powerpoint presentation in another Powerpoint presentation

The problem is this:
I´ve got two Powerpoint presentations.
I want to link the second slide of one presentation into the another presentation.
How I do this?
I can embed a presentation into another but I want to select the second slide, anyone can help?
You must have two powerpoint files opened.
In the source powerpoint:
Click on the slide preview and copy.
In the target powerpoint:
Create a new slide and then select the home ribbon.
Below paste there are more options, click on paste Special and then Paste Link.
One option must appear: 'Microsoft Powerpoint Slide Object'
Resize the object to fill the entire slide and it´s done.

Transferring a macro embedded PPT ribbon

Within Powerpoint 2010 I have customised a tab on ribbon with both standard and custom macro buttons using 'customize the ribbon'.
In an attempt to share this ribbon with friends I have exported the ribbon as an .exportedUI file and saved the presentation as a macro enabled template.
When I open up any file called (Presentation1) the buttons work fine as the name for the macros are 'Presentation1'!macro#. If I then save as or open another blank (Presentation 2) the buttons produce the error:
"The macro could not be found or has been disabled because of your security settings"
The problem appears to be with the name of the macro that is associated with the button.
Is it possible to mix custom with standard buttons on an exportable ribbon? Or will I have to create an add-in that produces a new tab then replicate the standard buttons required? I know it is possible to do this in Excel and in Word but in Powerpoint it appears not to be?

Connecting PowerPoint and Excel

How do I connect PowerPoint and Excel such that each slide in the PowerPoint slideshow shows the next Excel cell in the cell in column A of Excel?
Well, it's a bit of programming, but basically you'll want to:
Set a reference to Excel in
PowerPoint VBE.
Figure out where in PowerPoint you
want the Excel cell text to appear,
like a Title placeholder.
Create a SlideChange event in a
class and with with the slide
change, read the index of the slide
and map it to the next cell from an
array of cells.
Place that mapped index text in your
slide shape when the slide changes.
Create a sub that initializes that
fires the event monitoring - either
from a Ribbon button, manually from
F5 or via Auto_Open.
If you come back with code that you're having problems with, I'd be happy to consult further.