Results 1 to 9 of 9

Thread: CorelDRAW Macro

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2018
    Posts
    5

    CorelDRAW Macro

    I am trying to trace a black and white image with a macro in corelDRAW 2017. The steps to do it manually are:

    1. Select the image
    2. Click trace bitmat
    3. Go to outline trace
    4. Click on line art

    There is an option to remove the background, you can then select the background color you would like to remove. I want my macro to remove white.

    I can do the entire process in my macro except specifying the background color I would like to remove, it automatically is removing black. How can I change this?

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,206

    Re: CorelDRAW Macro

    What does this have to do with Visual Basic .Net?

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2018
    Posts
    5

    Re: CorelDRAW Macro

    The macro is programmed with Visual Basic.

  4. #4
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,753

    Re: CorelDRAW Macro

    Hmm, which version of Visual Basic? Visual Basic for Applications (VBA), legacy Visual Basic (VB3, 4, 5, or 6), or Visual Basic .NET
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2018
    Posts
    5

    Re: CorelDRAW Macro

    It is a VBA.

  6. #6
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,753

    Re: CorelDRAW Macro

    Moved to office development.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  7. #7

    Thread Starter
    New Member
    Join Date
    Jul 2018
    Posts
    5

    Re: CorelDRAW Macro

    Oh awesome, thank you! I'm new to this page so I wasn't exactly sure where to post.

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: CorelDRAW Macro

    I can do the entire process in my macro except specifying the background color I would like to remove
    if you post the code you have so far, someone may be able to assist
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  9. #9

    Thread Starter
    New Member
    Join Date
    Jul 2018
    Posts
    5

    Re: CorelDRAW Macro

    Dim traced1 As TraceSettings
    Set traced1 = photo.Bitmap.trace(cdrTraceLineArt, Smoothing = AdvancedOptions1.Smoothness1, AdvancedOptions1.Detail1, cdrColorLab, cdrCustom, 2, True, True, True)

    I convert the image to a black and white bitmap first. This code traces that bitmap. The last two trues are removing the background color. However, they remove the color that CorelDRAW decides is the background color, sometimes that is black, and I want it to remove white everytime.
    Last edited by Anysja; Jul 25th, 2018 at 10:54 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width