OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 04-03-2006, 14:47
Posts: n/a
Default Accessing .Cost & .Comments in Object Data

I can read the .StaticID property and read and write the .Name property.

I can neither read nor write the .Cost or the .Comments properties, nor a new property I added, called .Field0.

Here's the code that doesn't work when it gets to the .Comments property. I get and error 438 "Object doesn't support this property or method."

I bet it's something fundamental. Can anybody help?



Sub Setup()
Dim s As Shape
Dim x As Double, y As Double, w As Double, h As Double
Dim i As Double
Dim c As Double
Dim Control

Set Control = UserForm1.Controls("ListBox1")

ActiveDocument.ReferencePoint = cdrBottomLeft
c = 0
For Each s In ActiveDocument.ActivePage.Shapes
c = c + 1
Next s

Dim conarray()
ReDim conarray(c, 3)

c = 0

For Each s In ActiveDocument.ActivePage.Shapes
s.GetBoundingBox x, y, w, h, True
s.Selected = True
conarray(c, 0) = s.StaticID
conarray(c, 1) = s.Name
conarray(c, 2) = s.Comments '**** This line generates the error ****
'MsgBox ("Active Selection = " + Str(s.StaticID) + ", Name = " + s.Name)
c = c + 1
Next s
Control.List() = conarray

End Sub

Last edited by ghamor; 06-03-2006 at 10:41.
Reply With Quote
Old 04-03-2006, 17:54
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
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 Error

The line that generates an error should read like this:
conarray(c, 2) = s.ObjectData("Comments")
Hope it helps,

Reply With Quote
Old 06-03-2006, 10:50
Posts: n/a
Default Thanks!!!


Thanks so much!

I deduced from your comment that I could also set the Comments property by

s.ObjectData("Comments") = conarray(i, 2) ' save data to the Comments property

All this is working beautifully!

Thanks Again!

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
Objects in Document akayani Code Critique 9 06-02-2006 07:15
Background to object Fine! But Object to Background - How? marian General 2 15-07-2005 03:51
files import graphicdesigner CorelDRAW/Corel DESIGNER VBA 11 19-11-2004 23:56
Bounding lines around an object toy4mud CorelDRAW CS 2 04-11-2004 11:56

All times are GMT -5. The time now is 00:13.

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