powerpoint

How to convert all *.potx files to *.pptx files with VBA?

半腔热情 提交于 2019-12-06 21:40:31
I have a folder of ~20 *.potx files and I would like to convert all *.potx files to *.pptx, then delete the *.potx files. The following will loop through all your templates, convert, and delete the template files. Sub loopFiles() Dim fso As New FileSystemObject Dim fil As File Dim fold As Folder Set fold = fso.GetFolder(yourFolder) For Each fil In fold.Files If InStr(1, fil.Name, ".potx") > 0 Then Application.Presentations.Open fil.Path ActivePresentation.SaveAs Replace(fil.Path, ".potx", ".pptx"), ppSaveAsDefault ActivePresentation.Close 'if you truly want to delete them, don't recommend

Change the image of an image shape

喜欢而已 提交于 2019-12-06 15:04:15
I want to be able to change the image of an image shape by clicking on an button in my userform. In the internet I found the function UserPicture , but the image simply stays the same. Private Sub ChangeImage_Click() ActivePresentation.Slides("Slide1").Shapes("SolutionA_Image").Visible = True ActivePresentation.Slides("Slide1").Shapes("SolutionA_Image").Fill.UserPicture ("D:\User\Desktop\SolutionWrong.jpg") End Sub Private Sub HideImage_Click() ActivePresentation.Slides("Slide1").Shapes("SolutionA_Image").Visible = False End Sub When I click on the HideImage button, the shape becomes invisible

Copy Charts from Excel to PPT using VBA Macro

旧时模样 提交于 2019-12-06 13:42:53
I want to write a VBA Macro which copies few charts from Excel and pastes it in different slides in an already created PowerPoint Presentation( the PPT is not open, the code should be able to do that). I have tried doing that but it always gives some or the other error like "ActiveX component does not exist". I also read many solutions to this problem but all of them seem too messy. Can someone suggest a clear and clean method to do that? It would be very helpful! The Macro will be in Excel . Please find the code below: Sub ExcelToPres() Dim PPT As Object Set PPT = CreateObject("PowerPoint

An automated way to load multiple images into PowerPoint on different pages?

给你一囗甜甜゛ 提交于 2019-12-06 13:15:48
I need to load about 60 images, each on a different page, in to PowerPoint. Does anyone know of an "automated" way to do this. I don't want to go through slide by slide, and have to click "load image" on each one. If it was a one-time thing, I wouldn't worry about it, but we're summarizing results from some analysis that is ongoing and we'll have to do it many times. Thanks. edit: After brief discussion with co-worker, it seems that "insert -> photo album" does this easily. From PPTools : Insert -> Photo Album works well in PPT 2007. There are a few Problems in older Versions, because the

Any java library for ppt to jpg conversion?

醉酒当歌 提交于 2019-12-06 12:52:46
问题 Do you know any java library for ppt to jpg conversion? I've tried openoffice3 and POI (http://poi.apache.org/slideshow/quick-guide.html). OpenOffice takes quite long to load (full startup), even though I want to convert the slides only. POI-HSLF only generates images for simple slides (created by myself). all the test slides getting from internet failed to generate image, and the images it generated are very ugly/primitive. 回答1: You will need something full-fledged like OpenOffice.org,

Python pptx (Power Point) Find and replace text (ctrl + H)

夙愿已清 提交于 2019-12-06 11:29:48
Question in Short: How can I use the find and replace option ( Ctrl + H ) using the Python-pptx module? Example Code: from pptx import Presentation nameOfFile = "NewPowerPoint.pptx" #Replace this with: path name on your computer + name of the new file. def open_PowerPoint_Presentation(oldFileName, newFileName): prs = Presentation(oldFileName) prs.save(newFileName) open_PowerPoint_Presentation('Template.pptx', nameOfFile) I have a Power Point document named "Template.pptx". With my Python program I am adding some slides and putting some pictures in them. Once all the pictures are put into the

PowerPoint 2007/2010 VBA ppam Add-In does not show up in VBA editor when open

怎甘沉沦 提交于 2019-12-06 11:08:03
问题 I've created a PowerPoint 2007/2010 VBA Add-In (.ppam) some code in a module. I've also added an XML ribbon (not important, but it shows me that the file is in fact open in PowerPoint). I can click a button in the ribbon I created and it will execute code from my module. cool. When I open the VBA editor (ctrl + F11), the Add-In does not show up. In fact, if I don't have another document open I can't even open the editor. I've tried this in PowerPoint 2007 and 2010. How can I edit the code of

PowerPoint VBA macro to skip animation on a slide

牧云@^-^@ 提交于 2019-12-06 09:54:04
I've got some PowerPoint slides containing various pieces of custom animation (e.g. piece of text appears, pause, next piece of text appears, user clicks to show image). However, is it possible to add a macro so that the user could click a button and bypass all the animations to jump directly to the end state of the same slide? I know how to link a macro to a button, it's just the VBA itself that's the problem. Thanks Have you tried? Sub JumpToEndOfAnimations() Call SlideShowWindows(1).View.GotoClick(msoClickStateAfterAllAnimations) End Sub You can add a duplicate of the slide in its end state

How can I get the ActivePresentation file format from PowerPoint Interop

送分小仙女□ 提交于 2019-12-06 08:12:20
...for the enum Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType ? Todd Main You actually can't get the file format, unfortunately. The best that can be done is to read the extention, like in this thread: How to obtain PowerPoint File Format Programmatically . One other way is to use DSOFile to read the format. David B Heise Once the presentation is loaded it has no file format, only the internal memory structure. So from that POV it doesn't make sense to have the fileformat of the active presentation. That being said, using the extension is a horrible way to determine file format...though

Export Excel Charts as Images using Powerpoint VBA

感情迁移 提交于 2019-12-06 08:05:07
I have the below code that I have written to export "Chart1" from an Excel sheet called "Sheet1" to a new slide in a created instance of powerpoint: Sub ChartsToPowerPoint() Dim pptApp As PowerPoint.Application Dim pptPres As PowerPoint.Presentation Dim pptSlide As PowerPoint.Slide Dim pptSlideCount As Integer Dim ws As Worksheet Dim intChNum As Integer Dim objCh As Object 'Open PowerPoint and create a new presentation. Set pptApp = New PowerPoint.Application Set pptPres = pptApp.Presentations.Add 'Set the chart and copy it to a new ppt slide Set objChart = Worksheets("Sheet1").ChartObjects(