Programming from Excel

F

FGM

I am doing a sample out of "Excel and Access" by O'reilly.
He copies charts from Excel to Powerpoint. He puts the chart title name in
a text box on the powerpoint slide. However, I would like to add the excel
spreadsheet filename to the notes box at the bottom of the slide. I want to
be able to keep tract of where the chart came from but I do not want it to
show up on the slide presentation.
To refer to the first text box for the chart title he uses Set pptshapes =
pptslide.Shapes("Rectangle 2").
I have recorded a macro trying to figure out what the text box is called in
the notes area but have not had any luck. I just get the following:


ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1,
Length:=0).Select
With ActiveWindow.Selection.TextRange

does anyone know where i could find some help on this?

thanks


.Text = "how do you know this is the notes area?"
 
D

David M. Marcovitz

In some cases like this, the macro recorder is useless. Try

Set pptNotesShape = pptslide.NotesPage.Shapes.Placeholders(2)

For me, that gets me the shape where the notes are. I'm not sure why 2,
but it seems to work.

--David
 
F

FGM

Thank you ... much appreciated. It worked. Now all I have to do is figure
out how to get the excel file name to that area. Think I can..
Thank you.
 
D

David M. Marcovitz

Great. I'm glad I could help. You're on your own for that the Excel part
because I know next to nothing about VBA in Excel.
--David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top