powerpoint-vba

VBA : Number the slide if they are visible

我只是一个虾纸丫 提交于 2020-01-15 10:09:51
问题 I have a powerpoint presentation with hidden slides. I want to number only the visible slides. I got this code : Sub Numerotation() Dim x As Integer Dim diapo As Slide For Each diapo In ActivePresentation.Slides If diapo.SlideShowTransition.Hidden = False Then x = x + 1 diapo.HeadersFooters.Footer.Text = x Else diapo.HeadersFooters.Footer.Text = "" End If Next End Sub I got this error : Execution Error : '-2147188160 (80048240)': HeaderFooter (unknown member) : Invalid request I don't

VBA : Number the slide if they are visible

两盒软妹~` 提交于 2020-01-15 10:06:25
问题 I have a powerpoint presentation with hidden slides. I want to number only the visible slides. I got this code : Sub Numerotation() Dim x As Integer Dim diapo As Slide For Each diapo In ActivePresentation.Slides If diapo.SlideShowTransition.Hidden = False Then x = x + 1 diapo.HeadersFooters.Footer.Text = x Else diapo.HeadersFooters.Footer.Text = "" End If Next End Sub I got this error : Execution Error : '-2147188160 (80048240)': HeaderFooter (unknown member) : Invalid request I don't

Excel Userform Input going haywire

半世苍凉 提交于 2020-01-14 03:17:11
问题 I have the following code for a userform called SlideSorterStart : Private Sub Okay1_Click() Dim startOn As Integer startOn = SlideSorterStart.Input1 Unload SlideSorterStart End Sub Okay1 is the OK button here below, while Input1 is the name of the text box. I use the variable startOn in a module as follows: Sub SlideSorter(ByVal control As IRibbonControl) Dim first As Long: first = ActiveWindow.Selection.SlideRange.SlideIndex Dim last As Long: last = ActivePresentation.Slides.Count

Update PowerPoint chart without opening chart workbook or making it invisible

一个人想着一个人 提交于 2020-01-09 08:06:25
问题 Sub OO() Dim oPPApp As Object, oPPPrsn As Object, oPPSlide As Object Dim oPPShape As Object Dim FlName As String '~~> Change this to the relevant file FlName = "C:\Users\lich_\Documents\test.pptx" '~~> Establish an PowerPoint application object On Error Resume Next Set oPPApp = GetObject(, "PowerPoint.Application") If Err.Number <> 0 Then Set oPPApp = CreateObject("PowerPoint.Application") End If Err.Clear On Error GoTo 0 oPPApp.Visible = True Set oPPPrsn = oPPApp.Presentations.Open(FlName,

Update PowerPoint chart without opening chart workbook or making it invisible

﹥>﹥吖頭↗ 提交于 2020-01-09 08:05:09
问题 Sub OO() Dim oPPApp As Object, oPPPrsn As Object, oPPSlide As Object Dim oPPShape As Object Dim FlName As String '~~> Change this to the relevant file FlName = "C:\Users\lich_\Documents\test.pptx" '~~> Establish an PowerPoint application object On Error Resume Next Set oPPApp = GetObject(, "PowerPoint.Application") If Err.Number <> 0 Then Set oPPApp = CreateObject("PowerPoint.Application") End If Err.Clear On Error GoTo 0 oPPApp.Visible = True Set oPPPrsn = oPPApp.Presentations.Open(FlName,

Powerpoint macro enabled not working for others [closed]

别等时光非礼了梦想. 提交于 2020-01-07 09:34:09
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I have constructed a macro-enabled Power point presentation, it works on my machine, but when colleagues navigate to the file where it is saved and open it....the macros do not work! When they click on a command button, the presentation clicks to the next sheet, not fires the macro

How to change powerpoint pictures in widescreen format

梦想与她 提交于 2020-01-07 04:33:11
问题 Hi I'am a Newbee in the world of PowerPoint VBA and hope my english is not too bad: I have to solve the following problem in PowerPoint 2010: First I change into the 16:9 widescreen format, then I go through to every picture which are now too big and change with size-dialog box from the picture only by clicking the up and down arrow for scaling height. The picture will be in the right form which I used before in the 4:3 presentation. That is easy but not if you have to change more then 100 of

What is this strange character and how can I get rid of It?

一曲冷凌霜 提交于 2020-01-06 06:08:26
问题 This shows up in both .NET and in VBA. The male sign: ♂ You'll notice on lines 4, 5, 6, 8, 10 and 12 there is an extra character there. This is from a paragraph mark. On line 3 is a tab character, but that just shows up as spaces. This happens when I try to grab the text of a .TextRange.Text in PowerPoint. Above is the Immediate Window in the VBE, but it also shows up .NET controls when I try to put the text in a control, such as a ListView. It can be replicated by opening a new PowerPoint

What is this strange character and how can I get rid of It?

故事扮演 提交于 2020-01-06 06:06:03
问题 This shows up in both .NET and in VBA. The male sign: ♂ You'll notice on lines 4, 5, 6, 8, 10 and 12 there is an extra character there. This is from a paragraph mark. On line 3 is a tab character, but that just shows up as spaces. This happens when I try to grab the text of a .TextRange.Text in PowerPoint. Above is the Immediate Window in the VBE, but it also shows up .NET controls when I try to put the text in a control, such as a ListView. It can be replicated by opening a new PowerPoint

vba powerpoint select a slide by name

老子叫甜甜 提交于 2020-01-06 05:01:10
问题 I am trying to select a slide by name. I have added a title via the outline. below is the code that is not working. "item Idaho not found in the slide collection" ActivePresentation.Slides("Idaho").Select 回答1: The slide's name and the text in the title placeholder nave nothing to do with one another. Unless you've renamed it, the first slide in the presentation will be named "Slide1", the second "Slide2" and so on. If you specifically need a way to locate the slide whose title text = "Idaho",