powerpoint

Powerpoint VBA Harvey Balls

别来无恙 提交于 2019-12-11 16:27:18
问题 I'm trying to create some Harvey balls from VBA code in PowerPoint 2010+. For this, I'm inserting a circle shape and a pie one and combine them. Everything works fine if I'm inserting the two shapes from the ribbon and then align and combine them, but when I'm inserting the shapes from VBA, the result of combining them is completely different and I don't understand why. So: insert shapes from ribbon -> align using ribbon -> combine using ribbon -> everything OK insert shapes from VBA -> align

Autoplaying a movie in a PowerPoint presentation with C#

给你一囗甜甜゛ 提交于 2019-12-11 15:08:56
问题 I am currently trying to change some settings in a .pptx files via C# and Microsoft.Office.Interop.PowerPoint . I have some .wmv movies linked on several slides of the presentation. At the time the presentations were created, all movies play as soon as they are clicked. However, I want to change this to start automatically playing as soon as the slide is viewed. This this has to be done to a lot of presentations, so there is no way to do this manually. I found the PlaySettings.PlayOnEntry

Using IWebBrowser2 to put Widgets in PowerPoint — Automation Error: Unspecified Error

雨燕双飞 提交于 2019-12-11 13:56:16
问题 I created a simple macro to put an HTML widget from Weather.com in to a PowerPoint slide. It is not event-based, but ActionButtons call the ConnectWidget subroutine, when navigating to the slide. That's working fine, but you will notice that I have only been able to get this to work by first deleting the existing WebBrowser shape, and then re-creating it. I had to do this, ultimately, because any method call from wb after the .Navigate , I get an Automation Error/Unspecified Error, or Method

C# Paste HTML to Excel or PowerPoint

 ̄綄美尐妖づ 提交于 2019-12-11 13:52:22
问题 How to paste HTML ( tables ) code into Excel or PowerPoint? 回答1: I've overcome some issues concerning pasting HTML into Excel and PowerPoint and noticed that a lot of people are asking that. I'd like to share my research, solution I made out for it. Let's say we have a html file named html and we would like to access it in Excel, let's do following: Clipboard.SetText(html); We copy our html into the Clipboard. The clipboard generates from the html a real table or image/chart from the input

Weird bug on powerpoint vba

佐手、 提交于 2019-12-11 13:35:57
问题 I have a "mynote" textbox on a slide. If I execute: Sub test() If ActiveWindow.Selection.SlideRange.Shapes("mynote").Visible Then MsgBox "ok" End If end sub It works. But If I attach a shape with this macro: Sub test(oShape As Shape) If ActiveWindow.Selection.SlideRange.Shapes("mynote").Visible Then MsgBox "ok" End If end sub It doesn't work (no error message, no "ok" message) 回答1: It will depend on how you call it from another sub routine - you have to send in a shape. Like: Sub testYourTest

Using VBA in PowerPoint to change font

不想你离开。 提交于 2019-12-11 12:56:04
问题 How do I use VBA to make the font consistent throughout a PowerPoint presentation? I'm new to VBA, so the code I used could be completely wrong but here it is: Sub FontChange() Dim sld As Slide Dim shp As Shape For Each sld In ActivePresentation.Slides For Each shp In sld.Shapes shp.TextFrame.TextRange.Font .Size = 12 .Name = "Bauhaus 93" .Bold = False .Color.RGB = RGB(255, 127, 255) Next shp Next sld End Sub Thanks in advance for the help. 回答1: A few mods to Wayne's version in the event that

Export each slide of Powerpoint to a separate pdf file

吃可爱长大的小学妹 提交于 2019-12-11 12:41:54
问题 I need to generate for each slide of my presentation a pdf file. I'm using the following code: ActivePresentation.ExportAsFixedFormat ActivePresentation.Path & "\" & ActivePresentation.Name & ".pdf", ppFixedFormatTypePDF, ppFixedFormatIntentPrint This code works fine, but it exports all the slides into a unique pdf file. 回答1: You can do that: Below code will create pdf with adding the slide number at end of current folder, file name. Sub ExportSlidesToIndividualPDF() Dim oPPT As Presentation,

How to change/add chart data series in python-pptx?

本秂侑毒 提交于 2019-12-11 12:29:45
问题 I'm trying to set data in an existing chart using python-pptx. from pptx import Presentation pres_path = "C:\\pres.pptx" pres = Presentation(pres_path) pres.slides[3].shapes[4].chart.series[0].values (92.0, 330.0, 309.0, 313.0, 356.0, 421.0, 457.0) pres.slides[3].shapes[4].chart.series[0].values = (1,2,3) Traceback (most recent call last): File "<input>", line 1, in <module> AttributeError: can't set attribute There's a method mentioned in the documentation which seems relevant, but I can't

Detect when PowerPoint has finished saving a file

半城伤御伤魂 提交于 2019-12-11 12:29:02
问题 I am having problems saving a PowerPoint file in an add-in I am writing. Basically, I need to save the currently open presentation as a wmv and then FTP it to an external server... sounds easy eh? I have worked out how to save the currently open presentation as a wmv. I have also got code to check if a file is open so I can tell when the "save" process is complete. But the code just goes into an infinite loop. The wmv starts for get written but never goes beyond 0kb. If I remove the line

Run-Time Error when Adding Chart During PowerPoint SlideShow

橙三吉。 提交于 2019-12-11 12:21:55
问题 I have used vba in PowerPoint to add a chart to a slide. However, this only seems to work when I am in normal/slide view/edit mode. When I try to do this during a slideshow however, I get a runtime error saying: Method 'AddChart' of object 'Shapes' failed. The issue is that I'm using user input during the slideshow to filter what kinds of data I query and then I create new slides based on that data. Using standalone macros in slide view/edit mode wont help. Here's the relevant portion of my