Hello, im trying to make a macro with zero knowledge about script. The purpose of the macro is to export JPG to same folder location as CDR file, named with size (width & Height). ( and maybe, adding a custom text is pretty cool)
my intial design is in scale size 1:10 (ex. for 1 meter design, im designing in 10 cm)
setting for my export is
for file name usually i'll do
"custom text (280-340-kr)" - Width size x Height size - "custom text (mta-lp-etc)"
How do make code with setting above ?
Here's code that i took form this forum (code from Shelby Moore and Mek) and i'm trying to edit, but failed hehe.
Sub ExportJPEGCMYK() Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange OrigSelection.CreateSelection Dim expopt As StructExportOptions ActiveDocument.Unit = cdrCentimeter Set expopt = CreateStructExportOptions fnp = ActiveDocument.FilePath dn = Left$(ActiveDocument.FileName, Len(ActiveDocument.FileName) - 4) & ".jpg" Dim expflt As ExportFilter Set expflt = ActiveDocument.ExportEx(fnp + dn, cdrJPEG, cdrSelection, expopt) With expflt .AntiAliasingType = cdrNormalAntiAliasing .ImageType = cdrCMYKColorImage .Overwrite = True .ResolutionX = 72 .ResolutionY = 72 .SizeX = expopt.ResolutionX * ActiveSelectionRange.SizeWidth .SizeY = expopt.ResolutionY * ActiveSelectionRange.SizeHeight End WithEnd Subthanks