次の方法で共有


WebCommandButton オブジェクト (Publisher)

Web コマンド ボタン コントロールを表します。 WebCommandButton オブジェクトは Shape オブジェクトのメンバーです。

解説

Shapes.AddWebControl メソッドを使用して、新しい Web コマンド ボタンを作成します。

Web コマンド ボタン コントロール図形にアクセスするには、 Shape.WebCommandButton プロパティを使用します。

次の使用例は、Web フォーム の [送信 ] コマンド ボタンを作成し、ユーザーがボタンを選択したときに実行するスクリプト パスとファイル名を設定します。

Sub CreateActionWebButton() 
 With ActiveDocument.Pages(1).Shapes.AddWebControl _ 
 (Type:=pbWebControlCommandButton, Left:=150, _ 
 Top:=150, Width:=75, Height:=36).WebCommandButton 
 .ButtonText = "Submit" 
 .ButtonType = pbCommandButtonSubmit 
 .ActionURL = "https://www.tailspintoys.com/" _ 
 & "scripts/ispscript.cgi" 
 End With 
End Sub

プロパティ

関連項目

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。