OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 29-04-2003, 14:32
Jon Lorber
Posts: n/a
Default Creating a Static Name?

Is it possible to name an artistic text object in such a way that Corel VBA can easily access it and change it's contents? I've noticed that by recording Macros it arbitrarily names them and it changes each time.
Reply With Quote
Old 29-04-2003, 21:57
Posts: n/a

You can name an object (text or anything else) by using:

tools->object manager, then giving the selected object a name. Once you do that you can do searches for certain objects based on the name. Like so...

Private Function TextReplacer(Doc As Document, NewText As String, pagenum As Long, ObjectName As String)
        Dim s As Shape
             For Each s In Doc.Pages(pagenum).FindShapes(Name:=ObjectName, Type:=cdrTextShape)
            s.Text.Contents = NewText
               Next s
End Function
If you want to name something as you import it, do the following;

Doc.Pages(1).ActiveLayer.Import picname
Doc.ActiveShape.Name = "imported01"
Good Luck!

Reply With Quote

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
Creating palette causes errors CORNMEN CorelDRAW/Corel DESIGNER VBA 4 13-01-2005 16:05
Creating new document problems ddonnahoe Code Critique 2 20-11-2004 18:11
creating command buttons bumblebee CorelDRAW/Corel DESIGNER VBA 1 31-08-2004 09:35
Creating a menu automatically clausm CorelDRAW/Corel DESIGNER VBA 1 30-03-2004 10:07
Creating macros for CorelDraw 10 in CorelDraw 11 Rick Randall CorelDRAW/Corel DESIGNER VBA 1 14-03-2003 09:00

All times are GMT -5. The time now is 22:34.

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