[英]How to insert text to an existing Powerpoint Slide using Powershell
我嘗試了三種不同的方法,都無濟於事。
首先是:
$s = $presentation.Slides[$targetslide]
$tb = $s.Shapes.AddTextbox($horiz,$left,$top,$width,$height)
$tb.TextFrame.TextRange.Text = $fla
第二個是:
$f0a = ''
#$f1a is text to insert
$presentation.Slides[$targetslide].Shapes[1].TextFrame.TextRange.Replace($f0a, $f1a)
第三個是:
$s = $presentation.Slides[$targetslide]
$s.Shape[1].TextFrame.TextRange.Text = $fla
兩者似乎都不起作用。 你對我應該嘗試什么有什么建議嗎?
顯然,
$f0a=$s.Shapes[5].TextFrame.TextRange.Text
$test = $s.Shapes[5].TextFrame.TextRange.Replace($f0a, $f1a)
完美地工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.