replace
クラス: mlreportgen.ppt.TextBox
名前空間: mlreportgen.ppt
テキスト ボックスの段落の置換
説明
例
テキスト ボックス内のテキストの置換
プレゼンテーションを作成します。
import mlreportgen.ppt.* ppt = Presentation('myTextBoxReplacePresentation.pptx'); slide = add(ppt,'Blank');
mlreportgen.ppt.Paragraph
オブジェクトを作成します。
p = Paragraph('Hello World');
空白のスライド (slide
) にテキスト ボックスを追加します。
tb = TextBox(); tb.X = '1in'; tb.Y = '1in'; tb.Width = '4 in'; tb.Height = '2in'; add(slide,tb);
段落をテキスト ボックスに追加します。
add(tb,p);
テキスト ボックスのコンテンツを置き換えます。
replace(tb,'This is the real content');
プレゼンテーションを閉じて表示します。
close(ppt); rptview(ppt);
入力引数
textBox
— テキストを置き換えるテキスト ボックス
mlreportgen.ppt.TextBox
オブジェクト
テキストを置き換えるテキスト ボックス。mlreportgen.ppt.TextBox
オブジェクトとして指定します。
content
— 置換項目として使用するテキスト
文字ベクトル | string スカラー | mlreportgen.ppt.Paragraph
置換項目として使用するテキスト。文字ベクトル、string スカラー、または mlreportgen.ppt.Paragraph
オブジェクトとして指定します。
contents
— 置換項目として使用する複数の段落
string 配列 | cell 配列
置換項目として使用する複数の段落。string 配列として指定するか、cell 配列として指定します。cell 配列には、文字ベクトルか mlreportgen.ppt.Paragraph
オブジェクト、あるいは文字ベクトル、string スカラー、string 配列、mlreportgen.ppt.Paragraph
オブジェクトの組み合わせを含めることができます。cell 配列の場合、内側の cell 配列または string 配列のコンテンツは、外側の cell 配列のコンテンツからインデントされます。
出力引数
paraObj
— 段落
mlreportgen.ppt.Paragraph
オブジェクト
段落。mlreportgen.ppt.Paragraph
オブジェクトとして返されます。
バージョン履歴
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)