Page.XOffsetWithinReaderSpread プロパティ (Publisher)

リーダーの左端からページの左端までの距離 (ポイント単位) を表す Single を返します。 読み取り専用です。

構文

XOffsetWithinReaderSpread

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

戻り値

1 行

次の使用例は、作業中の文書の 2 番目と 3 番目のページに図形を作成し、3 番目のページの図形の位置を、2 番目のページの図形からページの斜め反対側の角に設定します。 この例を機能させるには、作業中のパブリケーションに少なくとも 3 つのページが必要です。

Sub OffsetShapePositions() 
 Dim shpOne As Shape 
 Dim intLeft As Integer 
 Dim intTop As Integer 
 Dim intWidth As Integer 
 Dim intHeight As Integer 
 
 With ActiveDocument 
 .ViewTwoPageSpread = True 
 
 With .Pages 
 intWidth = 150 
 intHeight = 150 
 intLeft = (.Item(2).Width / 2) - intWidth 
 intTop = InchesToPoints(7) 
 
 Set shpOne = .Item(2).Shapes.AddShape _ 
 (Type:=msoShape5pointStar, Left:=intLeft, _ 
 Top:=intTop, Width:=intWidth, Height:=intHeight) 
 
 intLeft = (.Item(3).XOffsetWithinReaderSpread - _ 
 .Item(2).XOffsetWithinReaderSpread) + (.Item(2) _ 
 .Width - shpOne.Left - shpOne.Width) 
 intTop = (.Item(3).YOffsetWithinReaderSpread - _ 
 .Item(2).YOffsetWithinReaderSpread) + (.Item(2) _ 
 .Height - shpOne.Top - shpOne.Height) 
 
 .Item(2).Shapes.AddShape Type:=msoShape5pointStar, _ 
 Left:=intLeft, Top:=intTop, Width:=intWidth, _ 
 Height:=intHeight 
 End With 
 End With 
End Sub

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

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