Dear Community,
I'm looking for an efficient solution which converts ".bmp" imges to ".jpg" format.
Let me explain my problem in detail.
I am having an external machine which is having Millions of images with .bmp format. Now i'm copying the .bmp images from source to destination and when copying into destination it should convert into .JPG format.
Please let me know where and how to convert the format using below macro code
Sub CopyPasteImages
Dim sOriginFolder, sDestinationFolder, sFile, oFSO
Dim iCount, i
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set vLensInspectionImageNames=ActiveDocument.Variables("vLensInspectionImageNames")
Set vImageSourcePath=ActiveDocument.Variables("vImagesLocation")
Set vImageDestinationPath=ActiveDocument.Variables("vImagesDestination")
Set vSuffixImageName=ActiveDocument.Variables("vSuffixImageName")
ArrFields = split(vLensInspectionImageNames.GetContent.String, ",")
ArrFields2= Split(vSuffixImageName.GetContent.String,",")
' iCount = 0
For Each fIndex in ArrFields
sOriginFolder = vImageSourcePath.GetContent.string&fIndex
sDestinationFolder = vImageDestinationPath.GetContent.string&ArrFields2(i)&"-"&fIndex
if oFSO.fileExists(sOriginFolder) then
' iCount = iCount + 1
oFSO.CopyFile sOriginFolder, sDestinationFolder
end if
' If iCount >=500 then Exit Sub
Next
End Sub
Thanks a ton in advance.
Regards,
Manideep