powerpoint-vba

Best Way to Copy Excel Table into PowerPoint (2010)?

牧云@^-^@ 提交于 2019-12-01 12:39:44
I'm trying to get a series of Excel tables into PowerPoint and successfully created a macro for this in Office 2013, but am trying to adapt it to Office 2010. The issue is when pasting the table to PowerPoint, Office 2010 seems to require a unique/different code. Originally I had: 'Copying Tables to PowerPoint Set PPApp = GetObject(, "Powerpoint.Application") Set PPPres = PPApp.ActivePresentation PPApp.ActiveWindow.ViewType = ppViewSlide For i = 0 To Table3 Sheets("Charts").Range(ChartStart, ChartEnd).Offset(i * Row2, 0).Copy Set PPSlide = PPPres.Slides(1) Set PPShape = PPSlide.Shapes.Paste

Changing data source of chart in powerpoint vba

眉间皱痕 提交于 2019-12-01 12:19:24
问题 I have a bar Chart in PowerPoint and want to select the row (Category 1 - 4, see Screenshot 1) depending on my selection in the ComboBox. This is my Code so far: Private Sub ComboBox1_Change() With SlideShowWindows(1).View Select Case ComboBox1.Value Case "Category 1" Case "Category 2" Case Else End Select End With End Sub I have no idea how to select source data when there is no seperate Excel-Sheet. There is just the "Excel-Sheet" in PowerPoint which is generated when inserting the Diagramm

Call subroutine when a specific slide loads, or on a timer

ぐ巨炮叔叔 提交于 2019-12-01 06:30:36
I'm working with a PowerPoint 2003 presentation for a kiosk display, and it is left running pretty much 24/7. One slide on it has the weather, the current date, and the 7 day forecast. I've already written the subs that will update the weather from an Excel workbook, and update the dates displayed, but right now I have to manually update it when I come in. Is there a way that I can have a subroutine (e.g. UpdateSlide() ) called when the slideshow reaches that particular slide? It seems like there is no official way to do this, I'm assuming for security reasons, but what about a timed event,

Powerpoint VBA Macro to copy object's size and location and paste to another object

懵懂的女人 提交于 2019-12-01 05:31:14
问题 Just switched to Mac from Windows and in ppt on Windows I had an addin that allowed me to copy an object's properties including size and/or location and paste it to another object, sort of like an advanced format painter with toggles for the properties you'd like to copy. I don't have this addin anymore, but I'd very much like to create a simple macro to copy size and location. Is this in the realm of possibility? If so could you provide the code or point me at a resource where I can teach it

Extracting comments from a PowerPoint presentation using VBA

泪湿孤枕 提交于 2019-11-30 21:34:46
I have a PowerPoint which contains around 50 slides. Each slide might have 1 or more comments provided by the reviwer (done using insert->comment menu). I am trying to get the comments programatically exported into a text file using this VBA code: Sub ConvertComments() ''# Converts new-style comments to old Dim oSl As Slide Dim oSlides As Slides Dim oCom As Comment Set oSlides = ActivePresentation.Slides For Each oSl In oSlides For Each oCom In oSl.Comments ''# write the text to file : (oCom.Text) WriteToATextFile oCom.Author, <what needs to come here>, oCom.Text Next oCom Next oSl End Sub In

How to “Refresh Data” via VBA in Power Point?

孤街醉人 提交于 2019-11-30 16:12:45
so far I have tried the Chart.Refresh and Chart.Update and also ChartData.UpdateLinks and neither work. My question is similar to this one only that this code did not work for my ppt How to update excel embedded charts in powerpoint? If i could Record Macro like in Excel the steps would be: 1.Select Chart 2.Chart Tools > Refresh Data This is code is what I have managed to write but it fails at "gChart.Application.RefreshData": Sub refreshchart() Dim ppApp As PowerPoint.Application, sld As Slide Dim s As PowerPoint.Shape Dim gChart As Chart, i As Integer ppApp.Visible = True i = 3 Set sld =

Edit a .ppam file for customizing an add-in

对着背影说爱祢 提交于 2019-11-30 13:57:48
问题 I was provided an add-in for powerpoint as a .ppam file and another add-in for Excel as .xslm file. The add-in's work great, but I would like to customize them with some internal requirements. My questions is - how to open the source code behind a .ppam file ( which I understand is a compiled version) to be able to perform the customizations. 回答1: If it's a PPAM file, it was created in PowerPoint from a PPTM file saved as an add-in. While you can edit loaded add-ins "in place" for testing

How to get the MD5 hex hash for a file using VBA?

主宰稳场 提交于 2019-11-30 07:01:07
问题 How can I get the MD5 hex hash for a file using VBA? I need a version that works for a file. Something as simple as this Python code: import hashlib def md5_for_file(fileLocation, block_size=2**20): f = open(fileLocation) md5 = hashlib.md5() while True: data = f.read(block_size) if not data: break md5.update(data) f.close() return md5.hexdigest() But in VBA. 回答1: http://www.di-mgt.com.au/crypto.html#MD5 回答2: An older question that could use a better answer. These functions are specifically

Passing a variant through COM object via PowerShell to run a macro in PowerPoint

时间秒杀一切 提交于 2019-11-30 03:51:17
问题 Trying to string the title together was enough of a challenge... I am trying to run some PowerPoint macros from PowerShell. I have gotten quite good at running macros from Powershell for Excel. When I run the macros on Excel, the Run() method from the COM object will take a variety of arguments, depending if the macro has any parameters. However on the other hand, the PowerPoint Run() method expects parameters, and I cannot work out how to pass them. My macro is expecting one string to be

How to “Refresh Data” via VBA in Power Point?

好久不见. 提交于 2019-11-29 23:21:27
问题 so far I have tried the Chart.Refresh and Chart.Update and also ChartData.UpdateLinks and neither work. My question is similar to this one only that this code did not work for my ppt How to update excel embedded charts in powerpoint? If i could Record Macro like in Excel the steps would be: 1.Select Chart 2.Chart Tools > Refresh Data This is code is what I have managed to write but it fails at "gChart.Application.RefreshData": Sub refreshchart() Dim ppApp As PowerPoint.Application, sld As