このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。
find
クラス: mlreportgen.ppt.Presentation
名前空間: mlreportgen.ppt
プレゼンテーションの検索
説明
は、指定されたプレゼンテーションで、searchResults
= find(presentation
,objectName
)Name
プロパティ値が objectName
と一致するコンテンツまたはスライド オブジェクトを検索します。
例
プレゼンテーションでのコンテンツの検索
PPT API クラスに長い完全修飾名を使用せずに済むよう、PPT パッケージをインポートします。
import mlreportgen.ppt.*
プレゼンテーションを作成します。タイトル付きの 2 つのスライドを追加します。
ppt = Presentation('myPresentation.pptx'); open(ppt); add(ppt,'Title Slide'); add(ppt,'Title and Content');
Name
プロパティが Title
であるプレゼンテーション オブジェクトを検索します。
contents = find(ppt,'Title')
contents=1×2 object
1×2 TextBoxPlaceholder array with properties:
Bold
Font
ComplexScriptFont
FontColor
FontSize
Italic
Strike
Subscript
Superscript
Underline
BackgroundColor
VAlign
Name
X
Y
Width
Height
Style
Children
Parent
Tag
Id
find
メソッドは、mlreportgen.ppt.TextBoxPlaceholder
オブジェクトの 1 行 2 列の配列を返します。最初のオブジェクトは最初のスライドのタイトル用で、2 番目のオブジェクトは 2 番目のスライドのタイトル用です。
最初のスライドのタイトルを My Presentation Title
に置き換えます。
p = Paragraph('My Presentation Title');
replace(contents(1),p);
プレゼンテーションを閉じて表示します。
close(ppt); rptview(ppt);
生成されたプレゼンテーションは次のようになります。
入力引数
presentation
— 検索するプレゼンテーション
mlreportgen.ppt.Presentation
オブジェクト
検索するプレゼンテーション。mlreportgen.ppt.Presentation
オブジェクトとして指定します。
objectName
— 検索する Name プロパティ値
文字ベクトル | string スカラー
検索する Name
プロパティ値。文字ベクトルまたは string スカラーとして指定します。
スライドをプレゼンテーションに追加する場合、add
メソッドは、スライド レイアウトに基づいて、スライド上のコンテンツ オブジェクトの Name
プロパティを設定します。getLayoutNames
を参照してください。Name
プロパティ値には次のものがあります。
'Title'
'Content'
'Table'
'Picture'
'Text'
'Vertical Text'
Name
プロパティは、カスタム値に設定することもできます。
出力引数
searchResults
— 検索結果
コンテンツまたはスライド オブジェクトの配列
検索結果。コンテンツまたはスライド オブジェクトの配列として返されます。配列には、次のようなコンテンツ オブジェクトが含まれます。
配列に mlreportgen.ppt.Slide
オブジェクトが含まれることもあります。
バージョン履歴
R2015b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)