 
    
    
 
	
	
		
		
	
	
	
	
		
	
	
		
			
- 
	
	
		
		
			
				
				
				
					Add Comment Picture: Maintain Perspective Ratio
				
					
						
							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
 
 
 
 
				
				
				
				
					my site: www.ecboardco.com 
was built w/ a majority of the assistance from the board members here... thanks VBAX.
 
Just because I see something, doesn't mean that what's actually happening is what I see.
 
You don't get from 0-90 by standing still! 
 
 
 
 
 
 
	
	
	
	
	
	
	
	
	
	
	
	
		
		
			
				 Posting Permissions
				Posting Permissions
			
			
				
	
		- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-  
Forum Rules