OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 21-09-2005, 11:50
Pumpkin_Masher
Guest
 
Posts: n/a
Default Help with Replace Macro

Where I work we use CorelDRAW 12 to create stickers for our products. Well we are now going through a name change, and I basically have to go through a thousand corel files and do a text replace on each one.

The text taht is replaced is the same on every file, so I thought I would record a macro that would help save me some time. The macro shows nothing but "Recording of this command is not supported"

I read somewhere else that this error occurs because my macro deals with Text and not Graphics, and that the macro has to be coded manually.

I know nothing about VBA and I could really use some help on getting a small text replacement macro working.

Thank you
Reply With Quote
  #2  
Old 21-09-2005, 14:41
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
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 Replace Text

A very simple replace text script would look like this:

Code:
Sub ReplaceText()

Dim s As Shape

For Each s In ActivePage.FindShapes(, cdrTextShape)
    s.Text.Replace "Old Company Name", "New Company Name", True, ReplaceAll:=True
Next s

End Sub
Basically it finds all the text objects on a page, then loops thru them looking for the words you want replaced. By setting the option after "New Company Name" to TRUE it is case sensitive.

Hope it helps,

Shelby
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
Find and Replace Text with Form RVogel CorelDRAW/Corel DESIGNER VBA 1 24-03-2005 09:37
Adding a Reference on a pwd protected macro Rick Randall CorelDRAW/Corel DESIGNER VBA 9 27-10-2004 09:27
An Idea for a handy and easy to make macro vallentin Macros/Add-ons 2 16-03-2004 11:35
New macro to clip curves w.r.t. a border Gerard Hermans Macros/Add-ons 0 09-06-2003 07:50
Speeding up a macro Rick Randall CorelDRAW/Corel DESIGNER VBA 2 12-12-2002 10:51


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


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