CCCPaste

ppt_FOLDER-IMAGES-TO-POWERPOINT

$folder = "C:\Users\ubewe\odub\digisign\rise\dean\main\251218-seacom-alumni-digisign\img\"
$ppt = New-Object -ComObject PowerPoint.Application
$ppt.Visible = [Microsoft.Office.Core.MsoTriState]::msoTrue
$presentation = $ppt.Presentations.Add()

# >>> Set slide size here, before adding slides <<<
# PowerPoint measures in points (1 inch = 72 points).
# At 96 dpi, 1920px ≈ 20 inches, 1080px ≈ 11.25 inches.
$presentation.PageSetup.SlideWidth = 20 * 72
$presentation.PageSetup.SlideHeight = 11.25 * 72

# Now loop through images
Get-ChildItem "$folder*.jpg","$folder*.png" | ForEach-Object {
$slide = $presentation.Slides.Add($presentation.Slides.Count+1, 12) # ppLayoutBlank
$slide.Shapes.AddPicture($_.FullName, $false, $true,
0, 0,
$presentation.PageSetup.SlideWidth,
$presentation.PageSetup.SlideHeight)
}