![]() |
#1
|
|||
|
|||
![]()
Hallo members.
![]() How do I add the date to file name? I'm using CorelDraw v12. Code:
Sub ExportSelectionToDesktop() Dim OrigSelection As ShapeRange, expflt As ExportFilter Set OrigSelection = ActiveSelectionRange Set expflt = ActiveDocument.ExportBitmap( _ "c:\Users\xxx\Desktop\" & ActiveDocument.Name & "HOW TO INSERT THE CURRENT DATE" & ".jpg", _ cdrJPEG, cdrSelection, cdrRGBColorImage, , , 300, 300, cdrSupersampling, , , UseColorProfile:=True) With expflt .Progressive = True .Optimized = True .SubFormat = 0 .Compression = 0 .Smoothing = 0 .Finish End With End Sub Regards. ~GrzJanik Last edited by grzjanik; 06-07-2012 at 02:03. |
#2
|
||||
|
||||
![]()
Hi.
Version 12 should have it. It's a VBA function. Code:
Private Sub ExportSelectionToDesktop() MsgBox VBA.CStr(VBA.Replace(VBA.Date, "/", "-")) Dim OrigSelection As ShapeRange, expflt As ExportFilter Set OrigSelection = ActiveSelectionRange Set expflt = ActiveDocument.ExportBitmap( _ "c:\Users\xxx\Desktop\" & ActiveDocument.Name & VBA.CStr(VBA.Replace(VBA.Date, "/", "-")) & ".jpg", _ cdrJPEG, cdrSelection, cdrRGBColorImage, , , 300, 300, cdrSupersampling, , , UseColorProfile:=True) With expflt .Progressive = True .Optimized = True .SubFormat = 0 .Compression = 0 .Smoothing = 0 .Finish End With End Sub Last edited by runflacruiser; 10-07-2012 at 16:14. |
#3
|
|||
|
|||
![]()
Thanks John.
It works very well in Corel v.12. How to write for the date format was day_month_year? (TestFile_11_07_2012.jpg) Thanks & regards. ~GrzJanik |
#4
|
||||
|
||||
![]()
Hi.
Cool. Give this one a shot: Code:
Private Sub ExportSelectionToDesktop() Dim strD$ strD = CStr(Format(VBA.Date, "dd-mm-yyyy")) MsgBox strD 'for testing Dim OrigSelection As ShapeRange, expflt As ExportFilter Set OrigSelection = ActiveSelectionRange Set expflt = ActiveDocument.ExportBitmap( _ "c:\Users\xxx\Desktop\" & ActiveDocument.Name & strD & ".jpg", _ cdrJPEG, cdrSelection, cdrRGBColorImage, , , 300, 300, cdrSupersampling, , , UseColorProfile:=True) With expflt .Progressive = True .Optimized = True .SubFormat = 0 .Compression = 0 .Smoothing = 0 .Finish End With End Sub |
#5
|
|||
|
|||
![]()
Thanks John.
Perfect work. This is exactly what I need. Thank you. Regards. ~GrzJanik |
![]() |
Tags |
date, save |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
save all grouped objects as a cdr file | runflacruiser | CorelDRAW/Corel DESIGNER VBA | 4 | 26-06-2009 21:55 |
Save pdf as CorelDraw File Name | ProofingGuy | CorelDRAW/Corel DESIGNER VBA | 8 | 12-06-2008 09:15 |
How to import values from a file, replace text,save file for each value with new name | amaart | CorelDRAW/Corel DESIGNER VBA | 1 | 28-09-2007 12:41 |
how to save multiple pages in coreldraw 12 OR how to save quality eps for animation | kickingandscreaming | General | 2 | 19-08-2007 22:28 |
VBA & Photoshop. How Save File anover format? | igor___ | CorelDRAW/Corel DESIGNER VBA | 5 | 30-11-2006 10:28 |