Having trouble maintaining the same file name when exporting to jpg after combining two cdr files into one. Here's what I'm doing:
1. Open initial "base" cdr file. (This is the master name, which the jpg name needs to match after macro is run.)
2. Import second "top" cdr file.
3. Using a macro, I'm making size, position and color adjustments as needed.
4. Save cdr file.
5. Export the finished cdr file to jpg.
6. Close cdr File.
The problem is this - when I recorded the actions to export out to a jpg the first time, the file name and string were part of the VBA code. Makes sense since that was the one I used to test. However, when I try to do this same action with other files (PEACH.cdr , ORANGE.cdr , LIME.cdr , etc.) they are all being output to "BANANA" since that is the filename set in the code. No good.
Here's the jpg export section of the macro:
Dim expflt As ExportFilter Set expflt = ActiveDocument.ExportBitmap("C:\TEST\BANANA.jpg", cdrJPEG, cdrAllPages, cdrRGBColorImage, 1024, 1024, 300, 300, cdrNormalAntiAliasing, False, False, True, False, cdrCompressionNone) With expflt .Progressive = False .Optimized = True .SubFormat = 1 .Compression = 0 .Smoothing = 0 .Finish End With
So how do I make "BANANA" match the actual active file name that is open and export the jpg to the exact same name? Is there a wildcard I'm missing to name the same as the active file, or? I'm lost.
Thanks for your help.
GFXCA