This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $pictureCoordinates = ['A30', 'H30']; | |
| $tempPicturePaths = []; | |
| $attachments = $activity?->attachments ?? collect(); | |
| foreach ($attachments->slice(0, 2) as $index => $attachment) { | |
| $pictureFile = $attachment->attachment_path; | |
| $picturePath = rtrim($this->storagePath, '/') . '/Attachments/Problem Pictures/' . $pictureFile; | |
| if (!Storage::disk('share')->exists($picturePath)) { | |
| continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get folders on the same path of this script | |
| $currentFolder = $PSScriptRoot | |
| # Start PowerPoint in the background | |
| $pptApp = New-Object -ComObject PowerPoint.Application | |
| # PowerPoint must be visible for some versions to work, but we will minimize interaction | |
| $pptApp.Visible = [Microsoft.Office.Core.MsoTriState]::msoTrue | |
| Write-Host "Searching for PPTX files in: $currentFolder" -ForegroundColor Cyan |