

已解决
提问者:PPT - 童生≈一级
改变更改幻灯片中各种对象的名称?
悬赏分:0 - 提问时间:2008-6-25 17:09:34 - 阅读次数:在设计PPT时,有时需要运用宏实现某种效果,但不知道怎么更改幻灯片中各种对象的默认名称,请解答一下。
在PowerPoint 2007中可以在“选择”面板中直接更改名称。
在PowerPoint 2007以前的版本中可以利用下面这段宏代码实现更改名称:
在PowerPoint 2007以前的版本中可以利用下面这段宏代码实现更改名称:
Sub NameShape()
Dim sResponse As String
With ActiveWindow.Selection.ShapeRange(1)
sResponse = InputBox("请输入名称:.", "重命名形状", .Name)
Select Case sResponse
'' blank names not allowed
Case Is = ""
Exit Sub
'' no change?
Case Is = .Name
Exit Sub
Case Else
On Error Resume Next
.Name = sResponse
If Err.Number <> 0 Then
MsgBox "无法重命名此形状!"
End If
End Select
End With
End Sub
提问者对答案的评价:


最佳答案