powerpoint

powerpoint c# add-in shape grouping issue

妖精的绣舞 提交于 2019-12-01 20:48:46
I developing a PowerPoint 2010 add-in using Visual Studio 2010 and am having significant issues with grouping two objects on a slide. I am trying to create the two objects, place them on the slide and group them all in the same function. Adding the objects and placing them on the slide is not an issue. When it comes to the grouping part though.... I have tried: PowerPoint._Application myPPT = Globals.ThisAddIn.Application; PowerPoint.Slide curSlide = myPPT.ActiveWindow.View.Slide; string[] myRangeArray = new string[2]; myRangeArray[0] = "nameOfShape0"; myRangeArray[1] = "nameOfShape1";

How to get the RGB/Long values from PowerPoint color palette

拟墨画扇 提交于 2019-12-01 19:29:17
问题 I am trying (mostly successfully) to "read" the colors from the active ThemeColorScheme . The subroutine below will obtain 12 colors from the theme, for example this is myAccent1 : I need also to obtain 4 more colors from the palette. The four colors I need will be the one immediately below the color indicated above, and then the next 3 colors from left-to-right. Because the ThemeColorScheme object holds 12 items only I get The specified value is out of range error, as expected if I try to

How to get the RGB/Long values from PowerPoint color palette

自闭症网瘾萝莉.ら 提交于 2019-12-01 18:32:32
I am trying (mostly successfully) to "read" the colors from the active ThemeColorScheme . The subroutine below will obtain 12 colors from the theme, for example this is myAccent1 : I need also to obtain 4 more colors from the palette. The four colors I need will be the one immediately below the color indicated above, and then the next 3 colors from left-to-right. Because the ThemeColorScheme object holds 12 items only I get The specified value is out of range error, as expected if I try to assign a value to myAccent9 this way. I understand this error and why it occurs. What I do not know is

Apply Font Formatting to PowerPoint Text Programmatically

≯℡__Kan透↙ 提交于 2019-12-01 17:56:17
I am trying to use VBA to insert some text into a PowerPoint TextRange , I use something like this: ActiveWindow.Selection.SlideRange.Shapes("rec1").TextFrame.TextRange.Text = "Hi" However, I can't figure out how to apply bold, italic and underline programmatically (I don't see a .RichText property or something similar). What I have is some simple HTML text with bold, italic and underlined text I would like to convert over. How to do this? This is easily accomplished by using the TextRange 's Characters , Words , Sentences , Runs and Paragraphs objects and then it's Font object to set Bold,

Formatting table in powerpoint macro

痞子三分冷 提交于 2019-12-01 14:19:12
I am trying to edit a table in a slide, and I am using this code. Can someone please tell me why it isn't working? If instead of s.Shapes.Table I have s.Shapes.Range for example it works fine. Sub format() Dim s As Slide For Each s In ActivePresentation.Slides With s.Shapes.Table .TextFrame.TextRange.Font.Name = "Arial" .TextFrame.TextRange.Font.Size = 30 End With Next s End Sub Like so instead: Sub format() Dim s As Slide Dim oSh As Shape Dim oTbl As Table Dim lRow As Long Dim lCol As Long For Each s In ActivePresentation.Slides ' If you choose Debug | Compile, this next line fails ' There's

Simple Example of creating a PowerPoint file

允我心安 提交于 2019-12-01 13:31:44
I'm looking for some sample code on how to add an image and text & output it as a PowerPoint file. The host server does not have Office and I'm not allowed to install anything so the "Manipulating Excel 2007 and PowerPoint 2007 Files with the Open XML Format API " will not help me. Below is the code the output the PowerPoint. I just don't know of to add text and images. Response.ClearContent(); Response.AddHeader("content-disposition", "attachment;filename=Filename.ppt"); Response.ContentType = "application/powerpoint"; System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI

Formatting table in powerpoint macro

守給你的承諾、 提交于 2019-12-01 12:53:16
问题 I am trying to edit a table in a slide, and I am using this code. Can someone please tell me why it isn't working? If instead of s.Shapes.Table I have s.Shapes.Range for example it works fine. Sub format() Dim s As Slide For Each s In ActivePresentation.Slides With s.Shapes.Table .TextFrame.TextRange.Font.Name = "Arial" .TextFrame.TextRange.Font.Size = 30 End With Next s End Sub 回答1: Like so instead: Sub format() Dim s As Slide Dim oSh As Shape Dim oTbl As Table Dim lRow As Long Dim lCol As

Best Way to Copy Excel Table into PowerPoint (2010)?

牧云@^-^@ 提交于 2019-12-01 12:39:44
I'm trying to get a series of Excel tables into PowerPoint and successfully created a macro for this in Office 2013, but am trying to adapt it to Office 2010. The issue is when pasting the table to PowerPoint, Office 2010 seems to require a unique/different code. Originally I had: 'Copying Tables to PowerPoint Set PPApp = GetObject(, "Powerpoint.Application") Set PPPres = PPApp.ActivePresentation PPApp.ActiveWindow.ViewType = ppViewSlide For i = 0 To Table3 Sheets("Charts").Range(ChartStart, ChartEnd).Offset(i * Row2, 0).Copy Set PPSlide = PPPres.Slides(1) Set PPShape = PPSlide.Shapes.Paste

Changing data source of chart in powerpoint vba

眉间皱痕 提交于 2019-12-01 12:19:24
问题 I have a bar Chart in PowerPoint and want to select the row (Category 1 - 4, see Screenshot 1) depending on my selection in the ComboBox. This is my Code so far: Private Sub ComboBox1_Change() With SlideShowWindows(1).View Select Case ComboBox1.Value Case "Category 1" Case "Category 2" Case Else End Select End With End Sub I have no idea how to select source data when there is no seperate Excel-Sheet. There is just the "Excel-Sheet" in PowerPoint which is generated when inserting the Diagramm

Accessing custom task pane is active window - Visual Basic, VSTO

▼魔方 西西 提交于 2019-12-01 11:29:47
I'm creating a COM add-in in VSTO for Ppt 2013 and am having a problem referencing the custom task pane in the active window. My code is supposed to make the custom task pane visible for the active window only, however it currently runs for all document windows. My code is: For Each CTP As Microsoft.Office.Tools.CustomTaskPane In Globals.ThisAddIn.CustomTaskPanes If CTP.Window Is Globals.ThisAddIn.Application.ActiveWindow Then CTP.Visible = True End If Next The taskpane is added to each new presentation created/ opened using the below code AddIn_control1 = New AddIn_control AddIn_taskpane = Me