![]() |
#1
|
|||
|
|||
![]()
Hi folks,
I've recorded a very simple of macro of saving active document as a version 9 in a specified location but the trouble is I don't how to make it save with the actual name of the active document rather than the one I used when I recorded the macro? Here it is: Sub save1() Dim SaveOptions As StructSaveAsOptions Set SaveOptions = New StructSaveAsOptions With SaveOptions .EmbedVBAProject = False .Filter = cdrCDR .IncludeCMXData = False .Range = cdrAllPages .EmbedICCProfile = False .ThumbnailSize = cdr10KColorThumbnail .Version = cdrVersion9 End With ActiveDocument.SaveAs "K:\TEMPORARY FILES\CDR\test.cdr", SaveOptions End Sub |
#2
|
||||
|
||||
![]()
Hi,
Those are properties of the document class. Code:
ActiveDocument.FileName 'or ActiveDocument.FullFileName Check out the properties, and they usually have examples too. Have fun! -John |
#3
|
|||
|
|||
![]()
Hi John,
VBA language is pretty much like a Chinese language to me I took a look at the guide you referred me to but every thing went over my head. Code:
Sub savev9() Dim SaveOptions As StructSaveAsOptions Set SaveOptions = New StructSaveAsOptions With SaveOptions .EmbedVBAProject = False .Filter = cdrCDR .IncludeCMXData = False .Range = cdrAllPages .EmbedICCProfile = False .ThumbnailSize = cdr10KColorThumbnail .Version = cdrVersion9 End With ActiveDocument.SaveAs "E:\Temp Files\Graphic1.cdr", SaveOptions End Sub |
#4
|
||||
|
||||
![]()
I think this should work:
Code:
Sub save1() Dim SaveOptions As StructSaveAsOptions Dim fn As String fn = ActiveDocument.FileName Set SaveOptions = New StructSaveAsOptions With SaveOptions .EmbedVBAProject = False .Filter = cdrCDR .IncludeCMXData = False .Range = cdrAllPages .EmbedICCProfile = False .ThumbnailSize = cdr10KColorThumbnail .Version = cdrVersion9 End With ActiveDocument.SaveAs "K:\TEMPORARY FILES\CDR\" & fn & " , SaveOptions" End Sub |
#5
|
|||
|
|||
![]()
Hi John,
It's saving with the right file name partially as it's adding extra string in the file name of save options for example if my file name is John.cdr then it's making it look like the one below: Code:
john.cdr, SaveOptions |
#6
|
||||
|
||||
![]()
Hi.
oops. My fault. That's what I get for not testing. Here's the fixed line for you: Code:
ActiveDocument.SaveAs "K:\TEMPORARY FILES\CDR\" & fn, SaveOptions ps. I still didn't test but this should do it...lol |
#7
|
|||
|
|||
![]()
Heh thanks John that did it. You are damn so helpful arn't you.
|
![]() |
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 |
JPEG to PLT in version 12 | dixlin | Site News | 2 | 28-10-2009 19:59 |
how to save multiple pages in coreldraw 12 OR how to save quality eps for animation | kickingandscreaming | General | 2 | 19-08-2007 23:28 |
New version soon? | kortshop | Calendar Wizard | 1 | 19-10-2006 14:41 |
version no. in fileconverter.gsm | ajk | CorelDRAW/Corel DESIGNER VBA | 5 | 21-03-2006 11:33 |
CorelDraw 10 Version | Anonymous | Jigsaw Puzzle Creator | 0 | 07-11-2003 20:10 |