A
Alicia
I have try adding a macro ("FilenameinFooter") in PPT. to update file path
automatically.
The macro is running fine and i add it as a add-in in powerpoint.
But now under my tools menu there is 20 commands that says "FilenameinFooter"
Does anyone know the cause of the problem, and revert it back to one command
only?
I have attached the writing of the macros below. Please help, Many Thanks
Dim FooterText As String
' And set it to the current presentation's full path/name
FooterText = ActivePresentation.FullName
' or if you prefer just the name use
' FooterText = ActivePresentation.Name
If ActivePresentation.HasTitleMaster Then
With ActivePresentation.TitleMaster.HeadersFooters
With .Footer
..Text = FooterText
..Visible = msoTrue
End With
End With
End If
With ActivePresentation.SlideMaster.HeadersFooters
With .Footer
..Text = FooterText
..Visible = msoTrue
End With
End With
End Sub
Sub Autpen()
Dim NewControl As CommandBarControl
' Store an object reference to a command bar.
Dim ToolsMenu As CommandBars
' Figure out where to place the menu choice.
Set ToolsMenu = Application.CommandBars
' Create the menu choice. The choice is created in the first
' position in the Tools menu.
Set NewControl = ToolsMenu("Tools").Controls.Add _
(Type:=msoControlButton, _
Before:=1)
' Name the command.
NewControl.Caption = "FilenameInFooter"
' Connect the menu choice to your macro. The OnAction property
' should be set to the name of your macro.
NewControl.OnAction = "FilenameInFooter"
End Sub
automatically.
The macro is running fine and i add it as a add-in in powerpoint.
But now under my tools menu there is 20 commands that says "FilenameinFooter"
Does anyone know the cause of the problem, and revert it back to one command
only?
I have attached the writing of the macros below. Please help, Many Thanks
Dim FooterText As String
' And set it to the current presentation's full path/name
FooterText = ActivePresentation.FullName
' or if you prefer just the name use
' FooterText = ActivePresentation.Name
If ActivePresentation.HasTitleMaster Then
With ActivePresentation.TitleMaster.HeadersFooters
With .Footer
..Text = FooterText
..Visible = msoTrue
End With
End With
End If
With ActivePresentation.SlideMaster.HeadersFooters
With .Footer
..Text = FooterText
..Visible = msoTrue
End With
End With
End Sub
Sub Autpen()
Dim NewControl As CommandBarControl
' Store an object reference to a command bar.
Dim ToolsMenu As CommandBars
' Figure out where to place the menu choice.
Set ToolsMenu = Application.CommandBars
' Create the menu choice. The choice is created in the first
' position in the Tools menu.
Set NewControl = ToolsMenu("Tools").Controls.Add _
(Type:=msoControlButton, _
Before:=1)
' Name the command.
NewControl.Caption = "FilenameInFooter"
' Connect the menu choice to your macro. The OnAction property
' should be set to the name of your macro.
NewControl.OnAction = "FilenameInFooter"
End Sub