referring to an embedded excel worksheet in powerpoint - excel

I searched in the net and found some similar cases, but they couldn't help me much.
I have an embeded Excel Worksheet in Powerpoint. I want to automatically save the Powerpoint Presentation as a PDF file, using a button.The name of the PDF file should include a number from a particular cell in the Excel Worksheet. I added a button (on the menu taskbar) with a macro, that automaticaly saves the Powerpoint as a PDF. Do you know, how can I refer to the cell in the Excel Worksheet in order to use it for the name of the PDF?
Many thanks for your help in advance!

this gets the first cell in first table in first slide
Debug.Print Application.ActivePresentation.Slides(1).Shapes(1).Table.Cell(1, 1).Shape.TextFrame.TextRange.Text

Related

VBA Excel copying the Visio current worksheet drawing and paste in Excel worksheet

I would like to copy the stuff from Visio to excel, if that possible.
I found some hint here:
Copying a visio page and pasting it in excel as an image
and tried to use in my code:
Sub Visio()
vsoPage.CreateSelection(visSelTypeAll).Copy
CIwb.Worksheets("Cables1").Paste
End Sub
but I am getting error 424 - object required.
Debugger points the following line:
vsoPage.CreateSelection(visSelTypeAll).Copy
How can I copy the current Visio worksheet to my current Excel sheet?
Take a deep look at the answer you refer in your question: Copying a visio page and pasting it in excel as an image
There's a note:
'Assuming your page object is named vsoPage 'This embeds the visio
drawing
So, you have to use a name of Visio page, which you want to copy.
Another requirement is to use proper Excel workbook and worksheet. So, do not use dummy-copy of code. Instead of it, try to understand what it does and change it to your needs.
Note: code presented in original question is placed in Excel! If you want to run it from Visio, you need to:
1) create an instance of MS Excel
2) open existing Excel workbook or create new one
3) copy Visio page
4) close Excel workbook
5) close an instance of MS Excel application
Good luck!

Extracting certain Powerpoint slides based on an Excel table and combine to new presentation

I have a huge PPT presenation (>400 slides) and want to extract certain pages based on an Excel table and create a new, smaller presentation.
I created an Excel table which includes the page numbers as well as the title of each slide in the PPT presentation.
The goal now is, to have a macro that allows me to create a new PPT with all the slides that are mentioned in my (sorted) Excel table.
As I am new with VBA (I am only able to copy/paste code and run it afterwards), I was not able to try anything.
Thanks for your help!

VBA tool to create powerpoint slide from excel?

Currently I have develop an excel sheet to extract data.
The output sheet (text + graph) should be exported to a PowerPoint slide.
Is there a way to do this with the help of a macro?
This is how it currently looks like. Ideally, I would add a button 'create slide', which triggers a macro to create a slide with this layout.
Any ideas?
Thanks!

open an specific excel sheet from powerpoint using object

Im trying to open a specific excel sheet from my PPt-slide using "insert>>object".
So my Excel Workbook is calling " mape1", and in this Workbook here are many sheets, and I want to open a specific one called "sheet1".
I gave the following pfad in the "object"
As Example
C:\Users\me\Desktop\mappe1\sheet1.xls
But it doesn't work
what am I missing?
Thank you for your help
Check out this support article from Microsoft I've linked below. It says by using the insert method you will bring in "all data from the active, top spreadsheet in the linked Excel workbook."
I suggest copy and pasting the selection you want into PowerPoint as is described here:
https://support.office.com/en-us/article/Import-data-from-Excel-into-PowerPoint-3ec295e9-1bfd-47ff-8d7d-8b838caef853#__toc241650191

Use VBA to copy an image from headers/footers of one sheet to another

I need to write a VBA code to copy a company logo in the headers/footers of one excel sheet to another sheet in another workbook. Any ideas?
Excel has a handy Record Macro function.
You can initiate that, Copy the footer over, then stop the recording.
Then, review the code, and it should pretty much show you how to do it.
If you are working in anything older than Excel 2007 then it doesn't sound like this is possible without using the original graphic file (e.g. JPG, GIF etc):
Normally, you can copy and paste the
headers and footers from one worksheet
to another by selecting the worksheets
and then using the Header or Footer
dialog boxes (click Custom Header or
Custom Footer on the Header/Footer tab
of the Page Setup dialog box).
However, if the original headers and
footers contain graphics, the graphics
will not propagate to the other
worksheets. The only way to work with
pictures in headers or footers for
multiple worksheets is to select all
the worksheets, and then insert a
graphic by using the Insert Picture
dialog box (click the Insert Picture
button), or format the graphic by
using the Format Picture dialog box
(click the Format Picture button). The
original graphic file is needed for
this procedure.
source
It may be possible in Excel 2007 - see here
One workaround is to copy the original worksheet to the new workbook:
' macro on the source workbook
Sheets("Sheet1").Move After:=Workbooks("Book2").Sheets(3)
When you do this, you get a worksheet in the destination workbook with all the features of the original, including footers and headers, you can then copy all the content you want into the new worksheet

Resources