OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Code Critique

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 19-10-2011, 01:46
scody
Guest
 
Posts: n/a
Default make symbols with text and objects no fill and no stroke

Pls see code below.
i have several symbols with text and objects that requires no fill and no stroke. I want to select symbols , select all contents (shapes & text) and make them all no fill. is my code correct?



Sub NoFill()

Dim s As Shape, s1 As Shape, sr As ShapeRange, sr2 As ShapeRange

Dim str1$, str2$

str2 = ""

Set sr = ActiveSelection.Shapes.FindContent(Query:="@content = 'symbol'")

For Each s In sr

str1 = s.Symbol.Definition.Name

If InStr("-*-" & str2 & "-*-", str1) = 0 Then

str2 = str2 & "-*-" & str1 & "-*-"

s.Symbol.Definition.EnterEditMode

Set sr2 = ActiveLayer.Shapes.FindShapes(Query:="@shape = 'shape'")

For Each s1 In sr2

s1.Fill.ApplyNoFill

Next s1

s.Symbol.Definition.LeaveEditMode

End If

Next s

sr.CreateSelection

End Sub
Reply With Quote
  #2  
Old 15-04-2012, 00:35
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 Symbol No Fill / No Outline

Here is my version:
Code:
Sub SymbolNoFillNoOutline()
    Dim s As Shape, s2 As Shape
    Dim sr As ShapeRange
    
    Set sr = ActivePage.Shapes.FindShapes(Type:=cdrSymbolShape)
    For Each s In sr.Shapes
        s.Symbol.Definition.EnterEditMode
            Set s2 = ActiveLayer.FindShape()
            s2.Fill.ApplyNoFill
            s2.Outline.SetNoOutline
        s.Symbol.Definition.LeaveEditMode
    Next s
End Sub
-Shelby
Reply With Quote
Reply

Tags
no fill, symbol


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
include groups - reverting symbols to objects gorgo CorelDRAW/Corel DESIGNER VBA 1 25-03-2011 13:16
Find and delete objects with no fill or outline keytecstaff CorelDRAW/Corel DESIGNER VBA 17 22-06-2010 23:34
how to make a vertical text? pony CorelDRAW/Corel DESIGNER VBA 2 30-08-2009 02:09
Align stroke on a path jod General 3 10-05-2007 21:07
How to make objects appear on the screen in real size? Alex FAQ 0 27-04-2005 11:16


All times are GMT -5. The time now is 03:15.


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