Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Title of PowerPoint linked to a 'name' in an Excel file
I have an Excel application ("Shop.xls") which allows users to copy
Excel charts directly to a PowerPoint deck ("Shop.ppt"). At the start of the application the user selects a geography from a drop-down and the result appears in a specific cell which is 'named' TARGET. I would like to program the application to automatically insert the TARGET into the title of the corresponding PowerPoint deck. The current title reads "An overview of shopper trends at XXX", and I would like to set the title to read "An overview of shopper trends at TARGET" based on whatever selection the user made up front. Can this be done, and if so how do I write the code? Is the code written in an Excel macro, or in a PowerPoint macro? Many thanks.. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Title of PowerPoint linked to a 'name' in an Excel file
Here are some ideas.
You'll have to select PowerPOint within your References to get this to work. You can also use late binding, but it's easier to understand at first this way. Dim PPTApp as PowerPoint.application Dim myPPT as PowerPoint.Presentation. 'Need to define PPTApp with GetObject or CreateObject. That exercise is left to the user :) Need to open myPPT. Do something like you would for Excel, but do Set myPPT = PPTApp.Presentations.Open ... When you get the presentation open, you can do something like this Dim mySlide as PowerPoint.Slide for each mySlide in myPPT.Slides .blay blah blah to go through the slides next mySlide if you know the slide number, you can do Set mySlide = pptapp.slides(8) 'or whatever the number To get to the Title do this dim myTitle as PowerPoint.shape Set myTitle = Nothing on Error resume next Set myTitle = myslide.shapes.title if not mytitle is nothing then mytitle.textframe.textrange.text = "Enter your title here" end if I know this is kind of skeletal, but you should be able to get there knowing what you know about Excel. I found the object models to be fairly similar (OK, I know there's a lot that's not in PowerPoint). If you have other questions, come back. I'll check again in the AM. HTH, Barb Reinhardt "Tony Bender" wrote: I have an Excel application ("Shop.xls") which allows users to copy Excel charts directly to a PowerPoint deck ("Shop.ppt"). At the start of the application the user selects a geography from a drop-down and the result appears in a specific cell which is 'named' TARGET. I would like to program the application to automatically insert the TARGET into the title of the corresponding PowerPoint deck. The current title reads "An overview of shopper trends at XXX", and I would like to set the title to read "An overview of shopper trends at TARGET" based on whatever selection the user made up front. Can this be done, and if so how do I write the code? Is the code written in an Excel macro, or in a PowerPoint macro? Many thanks.. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
improve clarity of excel data linked in PowerPoint | Excel Discussion (Misc queries) | |||
Gridlines ok in Excel but linked powerpoint- lines are missing | Charts and Charting in Excel | |||
Linked Excel graphs in PowerPoint | Charts and Charting in Excel | |||
How to spread the area of a linked excel worksheet in PowerPoint | Excel Discussion (Misc queries) | |||
insert linked chart from excel to powerpoint | Excel Programming |