I have a little problem with UiPath. I want to insert images into placeholders in a PowerPoint. I can do this without any problem using the “Insert image into PowerPoint” activity. However, the problem is that we receive the images in different sizes, i.e. sometimes the images are 50.8 cm x 30.10 cm and sometimes 5 cm x 10 cm. This makes the images look extremely distorted in PowerPoint after insertion, depending on the image. Is there a way to easily insert images of different sizes in a PowerPoint?
Dim originalImage As System.Drawing.Image = imageVariable
Dim newWidth As Integer = 200 ' Set your desired width
Dim newHeight As Integer = 150 ' Set your desired height
Dim resizedImage As New System.Drawing.Bitmap(originalImage, newWidth, newHeight)
imageVariable = resizedImage
Argument passed is an image variable, type: System.Drawing.Image; Direction: In/Out.