Sub MyShowPopupUnderRange()
  Rem *----*----*    *----*----*    *----*----*    *----*----*
  Rem 選択範囲下ショートカットメニュー表示処理
  Rem 作譜:Hitrock Camellia Shinopy
  Rem 言語:Word VBA
  Rem 機能...
  Rem   1. 選択範囲の下にショートカット メニューを表示する。
  Rem 注記...
  Rem   1.ショートカット メニューが (x, y) 座標に表示されると、
  Rem     その全部または一部が画面からはみ出す場合、
  Rem     ショートカット メニューは画面内に収まる位置にシフトされて表示されます。
  Rem 履歴...
  Rem   第01版:2009/02/28:作成。
  Rem *----*----*    *----*----*    *----*----*    *----*----*
  Dim pLeft As Long
  Dim pTop As Long
  Dim pWidth As Long
  Dim pHeight As Long
  Rem *----*----*    *----*----*    *----*----*    *----*----*
  Rem 指定された範囲の座標を返す。
  ActiveWindow.GetPoint pLeft, pTop, pWidth, pHeight, Selection.Range
  ' MsgBox "Left = " & pLeft & vbLf & "Top = " & pTop & vbLf _
  '   & "Width = " & pWidth & vbLf & "Height = " & pHeight
  '
  Rem 選択範囲の下にショートカット メニューを表示する。
  CommandBars("MyPopUp").ShowPopup pLeft, pTop + pHeight
End Sub ' MyShowPopupUnderRange *----*----*    *----*----*    *----*----*    *----*----*
inserted by FC2 system