0
VBaを初めて使用していて、最近、次の問題が発生しました。Excelシートのデータ(行)をパワーポイントにコピーし、 Excelで行)をコピーします。私が見つけることができたのは、Powerpointのメニューから手動でコンボボックスを挿入する方法でしたが、私は手作業でたくさん追加する必要はありません。 VBAコードでコンボボックスを追加する方法はありますか?pptテキストボックス内の各段落に対して自動的にコンボボックスを作成する
Here is some of the code I use:
'Loop through each worksheet
For Each objSheet In ActiveWorkbook.Worksheets
'Create new slide for the data
Set pptSld = pptPre.Slides.Add(Index:=pptPre.Slides.count + 1, Layout:=ppLayoutText)
'Paste the data to the text box of each slide
objSheet.UsedRange.Copy
pptSld.Shapes(2).TextFrame.TextRange.Paste
'Formatting the text box 2
pptSld.Shapes(2).TextFrame.TextRange.ParagraphFormat.Bullet = msoTrue
pptSld.Shapes(2).TextFrame.TextRange.ParagraphFormat.Bullet.RelativeSize = 1
pptSld.Shapes(2).TextFrame.TextRange.Font.Size = 16
Next objSheet
続けるには?各シート行のコンボボックスを定義したい