A a very quick question I was trying to get this powerpoint running and im having some labour intensive coding and i was curious is it quicker to do it another way
I want to save my powerpoint slide with changes as a jpg in a directory
however i have at least 500+ slides so i have a macro that says save active slide but its intense telling it what slide to save on
is there an easier way
heres the code anyways im sorry if i sound confusing
where it says active slide 3 can it be dynamic so i dont have to type it in
Code: Select all
Private Sub CommandButton3_Click()
'1) Brings up an input box that says "Change Project Scope"
'2) Creates a small text box, with size 14 black font, in the lower right-hand corner of the Active Slide with the value entered into the input box.
Dim objSlide As Slide
'---------------------------------------------
' User Variables
'---------------------------------------------
intFontSize = 14
strFontName = "Arial"
intFontColor = vbBlack
'This is for minor adjustment of textbox position
intMargin = 20
'---------------------------------------------
strProjectNumber = InputBox("Change the Scope of the Project", "Scope Change")
If strProjectNumber = "" Then Exit Sub
' Get the slide height and width.
intSlideHeight = ActivePresentation.PageSetup.SlideHeight
intSlideWidth = ActivePresentation.PageSetup.SlideWidth
Set myDocument = ActivePresentation.Slides(3)
'For Each objSlide In ActivePresentation.Slides
With ActivePresentation.Slides(3).Shapes.AddTextbox(msoTextOrientationHorizontal, 0, 0, 200, 200)
.Name = "MyTextBox"
.TextFrame.WordWrap = msoTrue
With .TextFrame.TextRange
.Text = strProjectNumber
With .Font
.Name = strFontName
.Size = intFontSize
.Color = intFontColor
End With
intTextBoxWidth = .BoundWidth
intTextBoxHeight = .BoundHeight
End With
.Left = intSlideWidth - intTextBoxWidth - intMargin
.Top = intSlideHeight - intTextBoxHeight - intMargin
End With
'Next
Dim SlideIndex As Long
SlideIndex = (ActivePresentation.SlideShowWindow.View.Slide.SlideIndex) + 1
FileName = "Jennings_" & CStr(SlideIndex) & ".JPG"
With Application.ActivePresentation.Slides(3)
.Export "H:\powerpoint\New00 Designs\CHANGES\" & _
"Slide 3 of A15.jpg", "JPG"
End With
End Sub