powerpoint-vba

How to reference an embedded PowerPoint or Excel file in a form in Access?

北城以北 提交于 2019-12-10 15:45:45
问题 So if I was to take a an Access form, and embed either an Excel spreadsheet into it or a PowerPoint deck, how would I reference it in VBA code? I know I have to set the libraries, name the frame of the OLE object, and use applicable syntax to whatever I want to do, with whatever I stick in the form, however the only things I have ever done with Excel and/or PowerPoint is automate the opening of a seperate window/application from Access, not within the Access form. So I am not sure how to

Branching Slides in PowerPoint (VBA)

你。 提交于 2019-12-10 13:09:42
问题 I am trying to create a back button but using hyperlinks it simply just takes me to the previous page and ends up in a loop... e.g. if I have slide 1 which has links to slide 3, 4 & 5 then slide 3 links to 6 & 7. If I'm currently on slide 7 and click back it successfully takes me back to slide 3 but then I want to click back and end up at slide 1 rather than back to slide 7 (hopefully I'm making some sense!). I presume the only way for me to do this is with VBA can anyone give me some advice

Update existing embedded chart in powerpoint using excel vba

半城伤御伤魂 提交于 2019-12-10 11:59:27
问题 I have an inserted chart in powerpoint. I am using this as a template. I would want to edit the data of this chart with data from an excel sheet. Is there an excel vba code for this 回答1: Any Chart in PowerPoint (there are exceptions, and it is possible to "break" existing charts, but that's not in scope, here) has a ChartData property, which returns an Excel Workbook that contains the data for the chart. When working from a "template" slide, it should be safe to assume that the chart data

How to find and replace a string in powerpoint using VBA

安稳与你 提交于 2019-12-08 15:26:37
问题 I would like to replace the word "hello" with "world" on slide 1 of the ppt. How can I do that using VBA script. 回答1: Sub findAndReplaceText() Dim sld As Slide Set sld = ActivePresentation.Slides(1) Dim shp As Shape For Each shp In sld.Shapes If shp.HasTextFrame Then If shp.TextFrame.HasText Then shp.TextFrame.TextRange.Text = Replace(shp.TextFrame.TextRange.Text, "hello", "world") End If End If Next shp End Sub Reference: https://www.youtube.com/watch?v=BYfKvVmtAGE 回答2: In a slight addendum

PowerPoint (or Excel) VBA Capture Coordinates of Mouse Click

Deadly 提交于 2019-12-08 13:50:02
问题 Some Background: The quick background is that I am in the research stages of building an add-in for PowerPoint. My end goal is to develop a CAD Dimensioning Add-in to help expedite the creating of Engineering Presentations. We have to do a lot of "PowerPoint Engineering" where the general sizes of components are shown on simplified versions of said components created with PPT shapes or screenshots of the CAD geometry itself. But creating dimensions over and over is tedious. Each one generally

Saving a PowerPoint in Excel VBA

好久不见. 提交于 2019-12-08 13:25:25
问题 I have code that creates a new powerpoint consisting of some images from an excel file. I want to save the file using a string variable to define its name. I've done my due diligence searching for solutions with no success, which surprises me based on how basic of a task I'm trying to complete. As of now, I have... newPowerPoint.ActivePresentations.SaveAs filenamestring, 1 newPowerPoint.ActivePresentations.Close But I keep getting a whole host of error messages. I have newPowerPoint defined

Macro to change Shape Colour on Mouse Hover in PowerPoint

人走茶凉 提交于 2019-12-08 11:20:45
问题 Is it possible to change the shape color on mouse hover using VBA in PowerPoint? I tried creating the same effect using animations+trigger but it requires a click. However I would like to change the shape color as I hover the mouse over it and change it back to the original color as I hover the mouse to next shape. Is this possible to achieve? Thanks in advance. 回答1: This is possible with a hack approach to overcome the fact that PowerPoint doesn't support the mouse-out event. What you can do

Insert hyperlink in a PowerPoint table cell with VBA

戏子无情 提交于 2019-12-08 10:42:22
问题 I'm working with PowerPoint 2007. I want to use a list to create a table on a slide. The first column of each row will have a hyperlink to a different slide in the presentation (like a summary slide). I'm having trouble using VBA to insert a hyperlink into a cell. The error message is usually something like "object doesn't support that function". Here is the offending line: With pptPres.Slides(2).Shapes("Table Summary").Table.Cell(i - 1, 1).Shape.ActionSettings(ppMouseClick).Hyperlink

VBA Powerpoint 2013: change presentation language including SmartArt objects

こ雲淡風輕ζ 提交于 2019-12-08 10:13:55
问题 I can not find a way to change by VBA script the language in SmartArt objects in Powerpoint 2013. I've seen PowerPoint 2007 - Set language on tables, charts etc that contains text but it does not work for SmartArt objects. Any idea how I could do this? Many thanks. 回答1: You need to access the Nodes (or GroupItems) of the SmartArt object like this: Sub SwitchSmartArtLanguage(oSA As SmartArt) Dim oNode As SmartArtNode With oSA For Each oNode In .Nodes oNode.TextFrame2.TextRange.LanguageID =

Any VBA code to align the picture from PowerPoint?

◇◆丶佛笑我妖孽 提交于 2019-12-08 08:55:55
问题 I have a PowerPoint document with 239 slides. I have to align the picture from every slide making the following two steps: 1. Right click and select Edit Picture 2. Then Press YES My question: Is there any macro (vba code) to do all this job automatically? Thanks! 回答1: Microsoft stores complex vector objects in WMF or EMF formats and in order to edit them one needs to convert them to native MSO drawing objects (vectors). The process to do this is to ungroup them and this code will do it for