Hey guys,
I am trying to have an VBA script open a certain JPG file, crop it and then safe it.
So far I got this:
Sub CreateScreenShots()
Dim fileLocation As Variant
Dim fileDirectory As Variant
Dim fileName As Variant
Set S = CreateObject("SNAGIT.ImageCapture")
fileDirectory = "C:\"
fileName = "test"
S.Input = siiGraphicFile
S.ImageTrim.Bottom = 100
'Set up the output so that we get .jpgs with the name of the form
S.Output = SNAGITLib.snagImageOutput.sioFile
S.OutputImageFile.FileNamingMethod = sofnmFixed
S.OutputImageFile.FileType = siftJPEG
S.OutputImageFile.Directory = fileDirectory
S.OutputImageFile.fileName = fileName
S.OutputImageFile.Quality = 100
S.OutputImageFile.ProgressiveOption = 0
'This pulls the trigger on SnagIt after the options are set up
S.Capture
Set S = Nothing
End Sub
All goes well unless the S.ImageTrim.Bottom command. I don't understand how to implement it correctly.
Thanks in advance.
Bookmarks