powerpoint

PowerPoint 2007/2010 VBA code to change Type of Gradient Fill on a Shape object

我与影子孤独终老i 提交于 2019-12-13 01:35:02
问题 With PowerPoint 2007 & 2010, I have been trying to change the Type of Gradient Fill on a Shape object from default "Rectangular" to "Path" for days. Searched online but seems like no such question asked. So far I can only get the Gradient Fill to be "Rectangle" (the default with 2 color gradient?). But I want it to be "Path". So far only able to do that by right click on the actual Shape --> Format Shape. "Format Shape" form shows and I can change the "Type:" from Rectangle to Path. But I

Loop Through Charts on Selected (or Range of) Powerpoint Slides

倖福魔咒の 提交于 2019-12-13 00:45:52
问题 I am currently using this code to update all links in my powerpoint presentation: Sub UpdateLinks() Dim ExcelFile Dim exl As Object Set exl = CreateObject("Excel.Application") ExcelFile = "C:\Users\J\Documents\Reporting\Governance Physical Charts.xlsm" Dim i As Integer Dim k As Integer 'Go through every slide For i = 1 To ActivePresentation.Slides.Count With ActivePresentation.Slides(i) 'Go through every shape on every slide For k = 1 To .Shapes.Count On Error Resume Next 'Set the source to

Powerpoint Slide Count Variable in VBA

北城余情 提交于 2019-12-12 23:38:27
问题 I am creating a Powerpoint in vba. My plan is to set up the code such that each subroutine creates a certain slides. However I need to pass through the slide number to each subroutine in order for it to create the proper slide in the right position. I am having trouble defining what the .Slides.Count is in excel vba. I understand it is technically a Long, but somehow I was able to pass it through as an Integer in another patch of code that is no longer working. My questions are: The .Slides

Using VBA to Paste Excel Chart with Data into PowerPoint

时间秒杀一切 提交于 2019-12-12 20:58:15
问题 Answer: TL;DR: pasting a chart with embedded data takes a long time so you have to install a delay to prevent vba from moving on before the paste operation completes. Question:I'm trying to paste an excel chart with embedded data into a powerpoint presentation. The only thing I am getting hung up on is referring to and positioning the chart in ppt once it has been pasted. Dim newPowerPoint As PowerPoint.Application ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.ChartArea.Copy

Out of Memory failure automating VSTO Powerpoint API

允我心安 提交于 2019-12-12 20:43:08
问题 I am using the VSTO Powerpoint API to automate the creation of Powerpoint files. What I have found is that using the most basic call to create a Powerpoint file from a web application on a Windows 7 system causes an out of memory error (other VSTO calls that manipulate an open file also fail): PowerPoint.Presentation presentation = _ppPresentations.Add(Office.MsoTriState.msoTrue); string outputDirectory= getOutputDirectory(); presentation.SaveAs(outputDirectory+ "\\CreateSlideTestOutput.pptx"

How to refresh the active Slide in a slide show?

喜夏-厌秋 提交于 2019-12-12 19:33:38
问题 Based on my last question I got the right code to change the image of an shape. Unfortunatly, this does not update the active Presentation. If I close the presentation and restart it, the image is changed, but the change should be directly visible. This is my code to change the image: ActivePresentation.SlideShowWindow.View.Slide.Shapes("SolutionA_Image").Fill.UserPicture ("D:\User\SolutionWrong.jpg") I found a way to update the presentation, but this lets the presentation flicker.

how to add a textbox to a powerpoint presentation using vba

萝らか妹 提交于 2019-12-12 18:27:20
问题 I'm writing a macro which creates a powerpoint presentation and then copys data from a spreadsheet and adds a title and a textbox. I've been able to add the data and tile and format both however I'm struggling to add a textbox. When I run the code below it returns the error 'ActiveX component can't create object'. I feel like over looking something simple. Any help would be greatly appreciated! (Error occurs on the line after the first set of '-------') Sub Create_Presentation() Dim rng As

Convert PowerPoint 2007/2010 file formats to svg using pptx4j in Java

余生长醉 提交于 2019-12-12 18:09:35
问题 In my Java project I am working on PowerPoint 2007/2010 file format so I am Using pptx4j open source project. However, I don't know how to convert PowerPoint 2007/2010 file formats to an SVG file. Can anybody help me? 回答1: See answer to your question here: Generate PowerPoint 2007/2010 file using Java 回答2: See http://dev.plutext.org/svn/docx4j/trunk/docx4j/src/pptx4j/java/org/pptx4j/samples/RenderAsSvgInHtml.java but not all shapes are supported, yet. 来源: https://stackoverflow.com/questions

Resizing picture using Powerpoint vba

雨燕双飞 提交于 2019-12-12 17:17:48
问题 I am trying to resize a picture that I have pasted into powerpoint from Excel using powerpoint vba. My code says: ActivePresentation.Slides(9).Select Application.ActiveWindow.View.PasteSpecial DataType:=ppPasteEnhancedMetafile This part works fine, I am at a loss as how to then resize the picture in the next step. I am new to using powerpoint vba. Any help would be much appreciated. 回答1: Never select anything unless you absolutely must, and you very rarely must.. Get a reference to the shape

Token StartElement in state EndRootElement would result in an invalid XML document

橙三吉。 提交于 2019-12-12 16:24:05
问题 I am working on a project where as i create a power point document from c#. Its all ging very well bu for some reason on one of my methods i am getting this error: "Token StartElement in state EndRootElement would result in an invalid XML document." Here is my method: private static void slideLayout6XML() { FileStream slideLayout6Stream = new FileStream( slideLayout6, FileMode.Create, FileAccess.Write ); XmlWriter slideLayout6Writer = null; try { XmlWriterSettings contentTypesSettings = new