replace
クラス: mlreportgen.ppt.PicturePlaceholder
名前空間: mlreportgen.ppt
画像プレースホルダーから画像への置換
説明
は、指定された画像プレースホルダーを指定された画像に置き換え、画像オブジェクトを返します。replacementPictureObj = replace(picturePlaceholder,picture)
例
Title and Picture スライドをプレゼンテーションに追加し、タイトルと画像プレースホルダーを独自のタイトルと画像に置き換えます。
PPT API クラスに長い完全修飾名を使用せずに済むよう、PPT 名前空間をインポートします。
import mlreportgen.ppt.*プレゼンテーションを作成します。
ppt = Presentation("myPicturePlaceholderPresentation.pptx");
open(ppt);Title and Picture レイアウトのスライドを追加します。
slide = add(ppt,"Title and Picture");スライド オブジェクトの find メソッドを使用して、Title という名前のプレースホルダー オブジェクトを見つけます。
titlePlaceholderObj = find(slide,"Title")titlePlaceholderObj =
TextBoxPlaceholder with properties:
Bold: []
Font: []
ComplexScriptFont: []
FontColor: []
FontSize: []
Italic: []
Strike: []
Subscript: []
Superscript: []
Underline: []
BackgroundColor: []
VAlign: []
Name: 'Title'
X: []
Y: []
Width: []
Height: []
Style: []
Children: []
Parent: [1×1 mlreportgen.ppt.Slide]
Tag: 'ppt.TextBoxPlaceholder:30:125'
Id: '30:125'
find メソッドは、mlreportgen.ppt.TextBoxPlaceholder オブジェクトを返します。
プレースホルダーのコンテンツをタイトル テキストに置き換えます。
replace(titlePlaceholderObj,"Airplane");スライド オブジェクトの find メソッドを使用して、Picture という名前のプレースホルダー オブジェクトを見つけます。
picturePlaceholderObj = find(slide,"Picture")picturePlaceholderObj =
PicturePlaceholder with properties:
Bold: []
Font: []
ComplexScriptFont: []
FontColor: []
FontSize: []
Italic: []
Strike: []
Subscript: []
Superscript: []
Underline: []
BackgroundColor: []
VAlign: []
Name: 'Picture'
X: []
Y: []
Width: []
Height: []
Style: []
Children: []
Parent: [1×1 mlreportgen.ppt.Slide]
Tag: 'ppt.PicturePlaceholder:31:126'
Id: '31:126'
find メソッドは、mlreportgen.ppt.PicturePlaceholder オブジェクトを返します。
画像プレースホルダーを画像に置き換えます。
replace(picturePlaceholderObj,Picture("b747.jpg"));プレゼンテーションを閉じて表示します。
close(ppt); rptview(ppt);
PowerPoint® は画像の寸法を調整して、画像プレースホルダーに合わせます。画像プレースホルダーの寸法が Picture オブジェクトの寸法より大きい場合、画像はそれに比例して引き伸ばされます。寸法が小さい場合、画像は中央に配置されます。
入力引数
画像プレースホルダー。mlreportgen.ppt.PicturePlaceholder オブジェクトとして指定します。
画像プレースホルダーの置換項目として使用する画像。mlreportgen.ppt.Picture オブジェクトとして指定します。
出力引数
置き換えられた画像。mlreportgen.ppt.Picture オブジェクトとして返されます。
バージョン履歴
R2015b で導入
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)