View.ScrollShapeIntoView メソッド (Publisher)

文書ウィンドウを、指定した図形が文書ウィンドウまたは作業ウィンドウに表示されるまでスクロールします。

構文

ScrollShapeIntoView (Shape)

View オブジェクトを表す変数。

パラメーター

名前 必須 / オプション データ型 説明
図形 必須 Shape スクロールして表示する図形を指定します。

次の使用例は、新しいページに図形を追加し、その図形が表示されるように現在のウィンドウをスクロールします。

Sub ScrollIntoView() 
 Dim shpStar As Shape 
 Dim intWidth As Integer 
 Dim intHeight As Integer 
 
 With ActiveDocument 
 intWidth = .PageSetup.PageWidth 
 intWidth = (intWidth / 2) - 75 
 intHeight = .PageSetup.PageHeight 
 intHeight = (intHeight / 2) - 75 
 
 With .Pages.Add(Count:=1, After:=ActiveDocument.Pages.Count) 
 Set shpStar = .Shapes.AddShape(Type:=msoShape5pointStar, _ 
 Left:=intWidth, Top:=intHeight, Width:=150, Height:=150) 
 shpStar.TextFrame.TextRange.Text = "New Star Shape" 
 End With 
 End With 
 
 ActiveView.ScrollShapeIntoView Shape:=shpStar 
 
End Sub

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

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