Beste,
Ik heb een code gevonden voor automatisch filename en het pad te zetten op iedere slide in powerpoint 2007.
Er zit een fout in de code. Is er iemand die mij zou kunnen helpen?
Het rode is fout.
Alvast bedankt,
Nathaly
Ik heb een code gevonden voor automatisch filename en het pad te zetten op iedere slide in powerpoint 2007.
Er zit een fout in de code. Is er iemand die mij zou kunnen helpen?
Code:
Sub UpdatePath()
' Macro to add the path and file name to each slide's footer.
Dim PathAndName As String
Dim FeedBack As Integer
' Place a message box warning prior to replacing footers.
FeedBack = MsgBox( _
"This Macro replaces any existing text that appears " & _
"within your current footers " & Chr(13) & _
"with the presentation name and its path. " & _
"Do you want to continue?", vbQuestion + vbYesNo, _
"Warning!")
' If no is selected in the dialog box, quit the macro.
If FeedBack = vbNo Then
End
End If
' Gets the path and file name and converts the string to lowercase.
PathAndName = LCase(ActivePresentation.Path & "\" & _
ActivePresentation.Name)
' Checks whether there is a Title Master, and if so, updates the
' path.
If ActivePresentation.HasTitleMaster Then
With ActivePresentation.TitleMaster.HeadersFooters
With .Footer
.Text = PathAndName
End With
End With
End If
' Updates the slide master.
With ActivePresentation.SlideMaster.HeadersFooters
With .Footer
.Text = PathAndName
End With
End With
' Updates the individual slides that do not follow the master.
Dim X As Integer
For X = 1 To ActivePresentation.Slides.Count
With ActivePresentation.Slides(X).HeadersFooters
With .Footer
[COLOR="Red"].Text = PathAndName[/COLOR]
End With
End With
Next
End Sub
Het rode is fout.
Alvast bedankt,
Nathaly
Laatst bewerkt: