powerpoint

How can I programmatically insert RTF text into a PowerPoint text frame using C#?

烂漫一生 提交于 2021-02-08 11:21:11
问题 Is there any way to programmatically insert RTF-formatted text into a PowerPoint TextFrame? string myString = <some RTF formatted text>; MyPlaceholder.TextFrame.TextRange.Text = myString; This answer gets me close: Is it possible to insert pieces of RTF text into a Word document (.docx) using OpenXml? But I am having trouble figuring out how to do this in PowerPoint rather than Word. What I am trying to do is copy text from a RichEditBox in my application onto a PowerPoint slide and maintain

VSTO OpenXml C# - Edit PowerPoint on Runtime

拜拜、爱过 提交于 2021-02-08 07:51:53
问题 I've read a lot about editing pptx files with OpenXml like PresentationDocument presentationDocument = PresentationDocument.Open("C:\\Users\\beggers\\Desktop\\Test.pptx", true) But how can I modify the XML data of my slides/presentation on runtime? Specialy when I run a new presentation witch is not saved. I am working on a C# VSTO Add-in and I want to modify my slide/xml in a way, which is not supportet by Microsoft.Office.Interop. 回答1: Unfortunately, Microsoft Word is the only Office

Identify active slide in C#

泄露秘密 提交于 2021-02-08 07:48:23
问题 I would like to know which is the current slide viewed by the user in PowerPoint (in edition not presentation). I used an SlideChange event with var new Index = Application.ActiveWindow.View.Slide.SlideIndex . The problem is when the cursor on the thumbnail panel on the left is not on a slide but between two. In that case, I have an error View (unknown member) : Invalid request. No slide is currently in view. which is normal because there is no view pointed. Unfortunately SlideChange event is

Adding pictures from the Web to a Powerpoint slide in VBA (MacOS)

ⅰ亾dé卋堺 提交于 2021-02-08 05:43:44
问题 I'm comfortably using VBA to iterate through a list of content in an Excel spreadsheet and creating slides in a separate Powerpoint file. That bit works. However I can't seem to add pictures to the Powerpoint presentation. I've tried: Using Shapes.AddPicture with an URL to the image. A few mention this should work; apparently it broke in some Office version (see http://www.pcreview.co.uk/forums/powerpoint-2007-vba-addpicture-web-image-problem-t3171074.html); Using Shapes.AddPicture with the

How to plot particular line chart with labels and titles in power point using python-pptx module?

南楼画角 提交于 2021-02-08 05:41:30
问题 I have a dataset which looks like this: A B C D AR 20201 1 200 AR 20202 1 300 AR 20203 1 1000 AR 20204 1 3000 AR 20205 1 700 AR 20206 1 800 AR 20207 1 900 AR 20201 2 1000 AR 20202 2 2000 AR 20203 2 3000 AR 20204 2 4000 AR 20205 2 5676 AR 20206 2 6000 AR 20207 2 1000 AR 20201 3 4500 AR 20202 3 4567 AR 20203 3 1000 AR 20204 3 900 AR 20205 3 600 AR 20206 3 200 AR 20207 3 100 ========================== BR 20201 1 BR 20202 1 BR 20203 1 BR 20204 1 BR 20205 1 BR 20206 1 BR 20207 1 BR 20201 2 BR

How can I check that PowerPoint or point viewer is installed on the machine?

痞子三分冷 提交于 2021-02-07 09:27:23
问题 I need to play PowerPoint slides but first I want to check whether PowerPoint or viewer is installed on the machine or not. How can I do that using .NET? 回答1: It depends on whether you are trying to tell whether you can view a presentation (*.ppt, *.pptx, etc) or whether you can access the PowerPoint object model. To check whether there is an associated handler for ppt files, you can do the following: // using Microsoft.Win32; private bool CheckPowerPointAssociation() { var key = Registry

How to display a .ppt in a web browser?

二次信任 提交于 2021-01-29 11:08:34
问题 I've tried to put a ppt file into my website (.aspx). I used a Microsoft.Office.Interop.PowerPoint namespace and it works fine but I want to display my presentation just in a web browser (especially IE, in a frame or something like this), not in a separate window. Is there any possibility to do so? 回答1: Convert ppt to flash, then embed the flash to the web page. 回答2: Upload the document to slideshare and embed their viewer. 回答3: Use href in case of link or src for frame. 回答4: If you simply

how to know which slides get modified by the user during presentation open and save in VSTO powerpoint c#

被刻印的时光 ゝ 提交于 2021-01-29 07:24:07
问题 On the BeforeSave event, I want to check that which slides get modified by the user. Technically I want to check that what was the state of slide when it opened and what is the state on saving, so I will get any acknowledgement for which slides are modified. private void Application_PresentationBeforeSave(Presentation Pres, ref bool Cancel) { MessageBox.Show("before save event.....HITED"); } This event hits successfully. i want to check if slide is modified by user or not. I know possible

Powerpoint change sound effect volume in macro

倾然丶 夕夏残阳落幕 提交于 2021-01-29 07:11:13
问题 is there a way that i can change the volume of a sound effect object through vba/a macro in powerpoint? even mute and unmute would be sufficient for what I am trying to do. 回答1: Dim oSh As Shape Set oSh = ActiveWindow.Selection.ShapeRange(1) With oSh.MediaFormat .Volume = 1 ' scale is 0 to 1 .Muted = False ' | True End With 回答2: a very ugly workaround. I am sure there is a better way of doing this, but here it is Sub mute() Dim gameSlide As Slide Set gameSlide = ActivePresentation.Slides(

Is there a way to edit existing paragraphs in slides using officer (or any other alternative) in R?

白昼怎懂夜的黑 提交于 2021-01-28 22:12:34
问题 I'm entering the task of creating automated reports using R. I have all the data that I need in a dataframe, and I have a template of the report in pptx format. The PPT has quite some design, so I'm preparing the slides instead of working with a layout pattern to make it easier. Slides have some pre-written paragraphs, and I need to insert data into specific positions of those paragraphs: for example, in one text box it says "in this case, there is a "value1"% of ..." and I would need to