Here is alternative attempt. It seems that I am using the wildcard incorrectly in both of my attempts.
Sub Main()
LayerFiles "C:\Rendermation\Renders\"
End Sub
Sub LayerFiles(strFolder)
Dim ObjPhotoshop
Dim fso, folder, files, folderIdx
Dim arrFileType
Dim arrCameraAngle
Dim InputImagePath As String
Dim OutputImagePath As String
Dim OutputWidthInPixels As Integer
Dim PsApp As Photoshop.Application
Dim PsDoc As Photoshop.Document
Dim PsSaveOptions As Photoshop.PNGSaveOptions
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(strFolder)
Set files = folder.files
'InputImagePath = "C:\Rendermation\Renders\" & "*.png" 'THIS DOES NOT WORK BUT THE NEXT LINE DOES
InputImagePath = "C:\Rendermation\Renders\bluestone_Flair_Channel_Cushion_R_3-4X3-4.3dm_Shadow.png"
OutputImagePath = "C:\users\Jill\Desktop\Test\"
If FileExists(InputImagePath) = False Then
MsgBox "The path of the input image is invalid!", vbCritical, "Input Image Path Error"
Exit Sub
End If
'Create a new instance of Photoshop application and make it visible.
On Error Resume Next
Set PsApp = New Photoshop.Application
If PsApp Is Nothing Then
MsgBox "Sorry, it was impossible to start Photoshop!", vbCritical, "Photoshop Application Error"
Exit Sub
End If
PsApp.Visible = True
'Try to open the input image.
If FileExists(InputImagePath) And folderIdx.Name = "*Shadow" Then
Set PsDoc = PsApp.Open(InputImagePath)
If PsDoc Is Nothing Then
MsgBox "Sorry, it was impossible to open the input image!", vbCritical, "Image Opening Error"
Exit Sub
End If
On Error GoTo 0
End If
End Sub