標題:
[發問]
無法讓巨集自動嵌入圖形
[打印本頁]
作者:
ssthree
時間:
2014-7-5 17:12
標題:
無法讓巨集自動嵌入圖形
以下代碼為:
在指定位置增加一個圖形,並在圖形中加入文字,讓這個圖形看起來像一個按鈕
這個圖形再加入一個指定巨集,讓這個按鈕能在按下的時候讓另一張圖片為最頂層(SendtoFront)
不過,不知哪裡出錯了,無法讓巨集自動嵌入圖形...
有高人幫忙指點一下嗎?
系統:XP (OFFICE 2003)
ActiveWindows.Selection.SlideRange.Shapes.AddShape(msoShapeRoundedEctangle, 661#, 152#, 56.62, 16.12).Select
ActiveWindow.Selection.ShapeRange.TesxFrame.TextRange.Characters(Start:=1, Length:=0).Select
With ActiveWindow.Selection.TextRange.Text = "點選範例"
With .Front
.NameAscii = "Arial Narrow"
.Size = 11
.Color.SchemeColor = ppBackground
End With
End With
With ActiveWindow.Selection.ShapeRange.ActionSettings(ppMouseClick)
.Run = "S2Ft2"
.Action = ppActionRunMacro
End With
Sub S2Ft2()
ActiveWindow.Selection.SlideRange.Shapes("Picture 8").Select
ActiveWindow.Selection.ShapeRange.ZOrder msoBringtoFront
End Sub
複製代碼
作者:
ssthree
時間:
2014-7-5 17:23
抱歉
幾個錯字,重新上傳 code
ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShapeRoundedRectangle, 661#, 152#, 56.62, 16.12).Select
ActiveWindow.Selection.ShapeRange.TesxFrame.TextRange.Characters(Start:=1, Length:=0).Select
With ActiveWindow.Selection.TextRange.Text = "TV ALL"
With .Front
.NameAscii = "Arial Narrow"
.Size = 11
.Color.SchemeColor = ppBackground
End With
End With
ActiveWindow.Selection.SlideRange.Shapes("AutoShape 9").Select
With ActiveWindow.Selection.ShapeRange.ActionSettings(ppMouseClick)
.Run = "S2Ft2"
.Action = ppActionRunMacro
End With
Sub S2Ft2()
ActiveWindow.Selection.SlideRange.Shapes("Picture 8").Select
ActiveWindow.Selection.ShapeRange.ZOrder msoBringtoFront
End Sub
複製代碼
歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)