powerpoint-vba

Save all Shapes of slide into single JPG image

不羁的心 提交于 2019-12-02 12:43:56
问题 I have a small tool to export the pictures inside ppt documents to image files, so I can import them somewhere else. For this, I have been using the following piece of code: For Each slideShape In slide If slideShape.Type = msoPicture Then Call slideShape.Export(materialPresentation.Path & "\" & ecode & "_" & cont & ".jpg", ppSaveAsJPG) cont = cont + 1 End If Next slideShape However, in a different tool, I am required to export all the shapes of a slide at once, exactly like selecting them

VBA: Copy + Paste Selected Charts from Excel to Powerpoint

…衆ロ難τιáo~ 提交于 2019-12-02 08:41:19
问题 I am looking to copy and paste selected charts from Excel 2010 to Powerpoint 2010 as Microsoft Excel Chart Object formats into an active PPT slide. Ideally, I would like to be able to place these charts into specific positions on the active Powerpoint slide. I've scrounged the web but all if not most solutions are for all slides in a sheet to be pasted randomly on a PPT slide. I don't even have a code but if anyone can help, that would be awesome. Thanks! 回答1: Well, here's something: This is

VBA: Copy + Paste Selected Charts from Excel to Powerpoint

亡梦爱人 提交于 2019-12-02 07:14:38
I am looking to copy and paste selected charts from Excel 2010 to Powerpoint 2010 as Microsoft Excel Chart Object formats into an active PPT slide. Ideally, I would like to be able to place these charts into specific positions on the active Powerpoint slide. I've scrounged the web but all if not most solutions are for all slides in a sheet to be pasted randomly on a PPT slide. I don't even have a code but if anyone can help, that would be awesome. Thanks! Well, here's something: This is a pptGenerator-class that I wrote some time back. In my scenario I wanted to right click specific charts in

PowerPoint Add-In Loss of RibbonUI

寵の児 提交于 2019-12-02 05:26:35
问题 I have been struggling to identify the cause of an error in a PPT Add-in that is distributed across about 40 end users. Problem: loss of the ribbon state/loss of the ribbonUI object. For some users, eventually the Rib object becomes Nothing . Users assure me they are not getting any run-time errors nor script errors (from COM object that we also invoke through this add-in). An unhandled error, if user hits End would expectedly cause the state loss. None of the users have been able to reliably

Pasted Shape not seen as “Latest” Shape

假如想象 提交于 2019-12-02 05:07:08
问题 I'm in the process of automating the production of a PowerPoint report from and Excel spreadsheet. I've got the process working up until I paste a table. I'm pasting the table to PowerPoint using PPApp.CommandBars.ExecuteMso ("PasteSourceFormatting") and the table appears as a shape on my slide (the third shape). To refer to the new shape I was using Set pShape = Slide2.Shapes(Slide2.Shapes.Count) but now now when I paste, the pShape is assigned "Shape 2" (not "Shape 3"). Is there something

How to add pictures to Powerpoint Presentation Picture PlaceHolder?

☆樱花仙子☆ 提交于 2019-12-02 02:30:59
I have created some code in Excel VBA to create a PowerPoint presentation 1 slide for each row of Excel, and populate in a specific text box in PowerPoint. I now want to add in all the images that match the description. These are all Jpegs and not charts etc. How can I do this, and is it better to do this in excel, or is it better to do this Powerpoint VBA itself? Eitherway, would anyone be able to help me out with some code on how to do this please? The image frames already exist in PowerPoint. There are 2 images per slide (no transitions or anything). Thank you! P.S I am using PowerPoint and

PowerPoint Add-In Loss of RibbonUI

断了今生、忘了曾经 提交于 2019-12-01 23:17:34
I have been struggling to identify the cause of an error in a PPT Add-in that is distributed across about 40 end users. Problem: loss of the ribbon state/loss of the ribbonUI object. For some users, eventually the Rib object becomes Nothing . Users assure me they are not getting any run-time errors nor script errors (from COM object that we also invoke through this add-in). An unhandled error, if user hits End would expectedly cause the state loss. None of the users have been able to reliably reproduce the scenario which causes the observed failure. This is what makes it very difficult to

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,