Powerpoint 2007 の [検索] ボタンの動作を再現しようとしています。 vba を記述して検索しているテキストを見つけることはできましたが、テキストを含む図形をメインの中央に配置したいと考えています。窓。私のコードは正しいスライドと形状を選択しますが、表示されません。
ppt.Presentations.open(strFloorPlan)
For each sld in ppt.Activepresentation.Slides
For each shp in sld.shapes
if shp.hasTextFrame then
set txtrng = shp.textFrame.TextRange
set foundtext =txtrnd.Find(findwhat:="A string representing my search criteria)
do while not (foundtext is nothing)
sld.select 'This works
shape.select 'This works
**At this point I have my text selected, but is off screen. I would like it to be in the current ppt window, so the users do not net to find it.**
Loop
End if
Next
Next