Welcome to TalkGraphics.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    2

    Default CorelDraw11 and VBA....

    Hi out there
    first of all, please excuse my english, the time I learned it was a few years earlier....
    My Problem:
    I have an Excel-Worksheet (Excel is nessesary, because I need it as a Excel-Table), I wrote a little Makro which forms a different number of Rectangles with Text inside. Those Rectangles are copied and I paste it into CorelDraw (I need CorelDraw for this step, because I have to work with a special Machine, that can only be controlled with CorelDraw). The Problem is, the Lines arround the Rectangles are in Corel 0,261mm, but I need them as thin as possible (In German it is called 'Haarlinie', unfortunately I don't know the English Word, may be 'Hair-Line'?)
    The best way to correct this would be a VBA-Makro wich can mark all the Rectangles and change the Line (in best Case even the Color of the Line), but if I try this, it happens that the Text get's also a Line around and that's very bad.
    If I have to do this by hand I have to mark up all the Rectangles (up to 120!!!) without marking any Text and change the Line. That's very bad handling.
    If I try to record a Makro with the VBA-Function it seems to me that CorelDraw makes no different between Text and Rectangles, everything is a 'shape'.
    The Question is:
    How kann I differentiate between Text and Rectangle in CorelDraws VBA.
    Is there anybody out there who knows and can help????
    Greetings from Germany
    Werner
    IP

  2. #2
    Join Date
    Dec 2003
    Location
    Lancaster, CA, USA
    Posts
    3,080

    Default Re: CorelDraw11 and VBA....

    It is true is you use the mouse and select all and tell it "hairline outline" that text will be outline. Easy to select all text and tell to remove the outline.

    I'd use the "Select Same" script. When activated, Select Same requires you to select one item you wish to select all of, so select one instance of outlined text, use the little pop-up box to select all the other type, then simultaneously remove all those outlines at once with a right click in the null fill on the color palette.

    That should do it. Is that easy enough? I know that this script works in both CorelDRAW 12 and X3.

    BTW, you can also do all of what you are using Excel for in DRAW, did you know that? It is part of the merge function.

    There is a great free tutorial that shows how Merge works at unleash.com featuring "Number Gen". A search for that name will bring up the right page. Understanding that and how to use labels is all you need to know to just use DRAW for what you are doing. You can use Excel as your data base. Of course your way works, but it is good to know more than one way.

    Another thought on the Select Same script is you can also select a shape before selecting all, select one of the shapes, then select all the similar shapes and apply the hairline outline. In order to then edit the line properties, you need to exit Select Same. Hitting F12 brings up your line dialogue box.

    That's it.
    Attached Files Attached Files
    Last edited by sallybode; 30 March 2007 at 03:46 PM.
    Every day's a new day, "draw" on what you've learned.

    Sally M. Bode
    IP

  3. #3
    Join Date
    Mar 2007
    Posts
    2

    Default Re: CorelDraw11 and VBA....

    Hi Sally
    great, this fast answer!!!
    Thank you very much. The SelectSame is a great step in the right direction. I can use that so far to solve the problem at this time. My 'dream' is to do some further things with my Rectangles or with the Text inside. I will have a look at the VBA-Code of SelectSame, may be I will understand and work with it.
    I will also have a look of the tutorial you talked about, but I think (till now) that our special routine will work a little better in Excel, because the form of Table is ideal for our work, but we will see.
    Once again many thanks for your tips. I'm shure I will be back to this forum to complete my 'dreams'.
    Werner
    IP

 

 

Bookmarks

Posting Permissions

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