I am compiling .jpg images to be viewed in Excel. I am using the .AddComment.Shape to perform this task. The problem I am facing is I have two different size images; one being 1100x647 the other being 647x874.

The first on is an image, a photoshop file converted to a .jpg format and the other is PDF, converted to a .jpg. The PDF is a typical 8.5x11 document setup. This is causing the issue.

Here is my code:
[VBA]
For Each file In Folder.Files
If (LCase(Right(file, 4)) = LCase(fileType)) Then
With ws.Cells(iCurrentRow, iColumn)
.Value = file.Name
.AddComment.Shape.Fill.UserPicture file.path
.Comment.Shape.Width = 1100
.Comment.Shape.Height = 647

iCurrentRow = iCurrentRow + 1
End With
[/VBA]

What I was thinking might work is rather than setting a hard value, is to use a percentage. But this is not allowed:
[VBA]
.Comment.Shape.Width = 100%
.Comment.Shape.Height = 100%
[/VBA]

If there is a workaround, this would be best. If not I am pondering changing the PDF to have a background of the same size. But this is going to be a chore. I have about 4000 images w/ 1000 of them being PDF. So it would take considerable time to alter the PDF image.

Thanks for having a look,

Doug