powerpoint

Replace existing image in MS PowerPoint with a new image using VBA

杀马特。学长 韩版系。学妹 提交于 2019-12-24 03:55:08
问题 I'm updating my MS PowerPoint by pasting images on different slides using VBA. Rest of the code is working fine. What I'm unable to do is delete the existing image on all the slides and paste the new image. Currently it paste the new image on top of old image, but old image remains. I'm using below code: Dim pptApp As PowerPoint.Application Set pptApp = CreateObject("PowerPoint.Application") pptApp.Visible = msoTrue xlApp.Worksheets(2).Range("M2:S12").Copy Set shp1 = ActivePresentation.Slides

PowerPoint Open “Record Slide Show” Dialog and detect if Presentation has a recording c# addin

帅比萌擦擦* 提交于 2019-12-24 03:07:40
问题 I am developing a PowerPoint AddIn and have been asked to add a reminder to the user to "Record Slide Show". Can anyone help me find out how to programmatically open the "Record Slide Show" dialog box and also how to detect if the user has already added a recording to the slide show please? Many thanks Trevor 回答1: Finally got this to work. In the ribbon I have added the following: public static void callRecordDialog() { Globals.ThisAddIn.Application.CommandBars.ExecuteMso("RecordNarration");

OLEFormat (unknown member): Invalid Request in PowerPoint

懵懂的女人 提交于 2019-12-24 02:23:36
问题 I am using this particular code by Belisarius: Sub a() Dim oSl As PowerPoint.Slide Dim oSh As PowerPoint.Shape Set oSl = ActivePresentation.Slides(1) Set oSh = oSl.Shapes(1) With oSh.OLEFormat.Object.WorkSheets(1) .Range("A1").Value = .Range("A1").Value + 1 .Range("A2").Value = .Range("A2").Value - 1 End With Set oSl = Nothing Set oSh = Nothing End Sub I've embedded a line chart (with the ability to change values in excel) using insert menu in PowerPoint 2010. I'm getting an error that says

UI Automation events not getting caught from PowerPoint 2007

老子叫甜甜 提交于 2019-12-24 02:13:48
问题 I am trying to capture UI Automation events from PowerPoint 2007 (or ideally any version) when the user selects a new Ribbon tab. Using the SDK tools Inspect and AccEvent I have determined that a reasonable "parent" element to catch these events is the "Ribbon Tabs" element. When I Scope AccEvent to that element, and register for SelectionItem_ElementSelected within the automation events, I get the events as I would expect - when a tab is clicked, AccEvent catches and logs it. I am only

How to programmatically extract and manipulate images from an Office file?

≯℡__Kan透↙ 提交于 2019-12-23 21:11:37
问题 How to extract some images from PowerPoint and Word documents, in order to manipulate them, and after that, put the images back in the MS Office files? 回答1: Apache has a project called "POI" explicitly made for interacting with MS Office formats from Java. Hopefully that does it for you! http://poi.apache.org/ 回答2: Apache POI can handle Word documents via its HWPF module, and extract or insert images from these. Although it's not well documented, check out the POI unit tests for image

OpenFileDialog VBA (Powerpoint) Initial Directory

此生再无相见时 提交于 2019-12-23 18:54:28
问题 Please help me make my OpenFileDialog showing my PowerPoint project directory. i tried .InitialDirectory = "C:\\" ,but it doesn't work. Can i adapt this to vba? Thanks. 回答1: This is nearly copied from the Powerpoint VBA help. It uses FileDialog instead of OpenFileDialog (which I had difficulty finding in relation to PowerPoint). It sets the InitialFileName to C:\ so that it will prompt in that location. Just place this in a module, it should be easy to modify to your specific needs: Sub

How to copy image of a chart from Silverlight application to clipboard?

淺唱寂寞╮ 提交于 2019-12-23 18:35:41
问题 I have a Silverlight 3.0 applications with some custom graphics and some charts. I need to find the best way to transfer these graphics to a PowerPoint presentation. I've read that Silverlight 4.0 offers a Clipboard API, but there is only support for Unicode-text, not images. Is there a way to achieve this task without forcing users to manually PrtSc and than paste to other applicatons? 回答1: There's no simple way to do this in SL3. My recommendation would be to use a WriteableBitmap and save

MS PowerPoint: how to convert a shape's position and size into screen coordinates?

时间秒杀一切 提交于 2019-12-23 18:13:56
问题 I wrote me a little VBA Macro for PowerPoint (2010) that opens a popup with explanations when hovering over some Shape. This works fine. Alas, there is no event that is triggered when leaving the area again and so I now want to extend the code such that it monitors the area of the popup and when the pointer leaves that area it removes the popup again. But now I ran into some stupid problem: the coordinates of the Shape (.Left, .Top, .Width, and .Height) are given in some "document units" (don

Powerpoint 2011 Mac reports Method 'Export' of object '_Slide' failed

痴心易碎 提交于 2019-12-23 17:18:51
问题 In Powerpoint 2011 (Mac), the following code is returning Run-time error '-2147483640 (80000008)': Method 'Export' of object '_Slide' failed I've tried every variant of this call I could find, this works fine on Windows, and as export appears as a valid method call in Mac VBA should be supported. Can't find any references to the error in Google. So I am stumped as to why this is appearing. Local variable watcher shows oSld as a valid slide, and sImagePath as a valid file name. Any insights

How to automatically trigger the App Object initialization in Powerpoint?

久未见 提交于 2019-12-23 16:38:55
问题 It is said here: http://msdn.microsoft.com/en-us/library/aa211599%28v=office.11%29.aspx Before the procedure will run, you must connect the declared object in the class module (App in this example) with the Application object. You can do this with the following code from any module. Dim X As New EventClassModule Sub InitializeApp() Set X.App = Application End Sub Run the InitializeApp procedure. Run HOW ? By hand ? I want it to automatically run when opening the powerpoint rather. Is there