Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exporting (save) document with a macro on corel X5

Status
Not open for further replies.

monteiro99

Technical User
Apr 26, 2011
1
GB
Hi, this is my first forum so sorry if i didn't put in the correct place, this is what i want to do, i have a template where i run several macros to do several things however i have tried to create a macro to export the final design with custom size and the macro wont run, is there a way of doing it?

many thanks in advance.

Jorge
 
I'm on X4 but X5 shuold have the same vba capabilities. Here's a sample code that should help...note the drawback of this functionality is that the file name and directory must be hardcoded or other codes needs to be introduced in order to get the user to put the directory and file name.

Code:
Sub ExportToWinLase()
    ' Recorded 5/13/2011
    ' Saves file as .plt
    Dim savetopath As String
    Dim expopt As StructExportOptions
    'Dim yn As String
        
    Set expopt = CreateStructExportOptions
    expopt.UseColorProfile = False
    
    Dim expflt As ExportFilter
 
    Set expflt = ActiveDocument.ExportEx("c:\test.plt", cdrHPGL, cdrAllPages, expopt)
    expflt.ShowDialog
    expflt.Finish
    
End Sub

Also, you can find this information in the vba programming guide for X5 which should be located in the following path of your machine.

C:\Program Files\Corel\CorelDRAW Graphics Suite X4\Programs\dvba_pg.pdf

Good luck



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top