OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-01-2012, 10:37
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default export multiple pages to DXF

Hi, got this code with help from John GDG. I'd like to export each page as a DXF please. I reckon it will need Next P and such, just can't recall how the rest goes.

Code:
Sub exportDXF()

    Dim s As Shape, sr As ShapeRange
    Dim w As Double, h As Double
    Dim count As Double, path As String
    
    path = "C:\temp\"
    count = 1
    Set sr = ActivePage.Shapes.All
    
    For Each s In sr
        s.GetSize w, h
        s.CreateSelection
        ActiveDocument.Export (path & "w" & Round(w, 2) & "_x_" & "h" & Round(h, 2) & "_" & count & ".dxf"), cdrDXF, cdrAllPages
        count = count + 1
    Next s
End Sub
__________________
Using: CorelDraw X4 (14.0.0.701)
OS: Windows XP Pro
Reply With Quote
  #2  
Old 11-01-2012, 11:14
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,790
Blog Entries: 13
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Each Page

Here is a simple example, see if you can get it working: Export each page

-Shelby
Reply With Quote
  #3  
Old 11-01-2012, 12:41
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default

Quote:
Originally Posted by shelbym View Post
Here is a simple example, see if you can get it working: Export each page

-Shelby
I'm getting way too many files.....I don't know what's wrong.

Code:
Sub exportWMF()

    Dim s As Shape, sr As ShapeRange
    Dim w As Double, h As Double
    Dim count As Double, path As String
    Dim p As Page
    
    path = "C:\temp\"
    count = 1
    Set sr = ActivePage.Shapes.All
    
    For Each p In ActiveDocument.Pages
    p.Activate
    For Each s In sr
        s.GetSize w, h
        s.CreateSelection
        ActiveDocument.Export (path & "w" & Round(w, 2) & "_x_" & "h" & Round(h, 2) & "_" & count & ".wmf"), cdrWMF, cdrSelection
        count = count + 1
        Next s
    Next p
End Sub
__________________
Using: CorelDraw X4 (14.0.0.701)
OS: Windows XP Pro
Reply With Quote
  #4  
Old 11-01-2012, 23:41
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default

doh!

http://coreldraw.com/forums/t/19327.aspx
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Export multiple objects separately. elekrytyk CorelDRAW/Corel DESIGNER VBA 1 24-08-2010 10:26
how to save multiple pages in coreldraw 12 OR how to save quality eps for animation kickingandscreaming General 2 19-08-2007 22:28
Export all pages of CDR to illustrator format RichT Macros/Add-ons 3 18-05-2007 10:37
Import PDF with multiple pages. rsriram22 CorelDRAW/Corel DESIGNER VBA 1 20-03-2006 10:54
Importing multiple files to separate pages knowbodynow CorelDRAW/Corel DESIGNER VBA 3 16-03-2006 09:14


All times are GMT -5. The time now is 05:06.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com