OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-03-2006, 15:47
ghamor
Guest
 
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?

Thanks

Gary

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
ActiveDocument.ClearSelection
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 ****
ActiveDocument.ClearSelection
'MsgBox ("Active Selection = " + Str(s.StaticID) + ", Name = " + s.Name)
c = c + 1
Next s
Control.List() = conarray

UserForm1.Show
End Sub

Last edited by ghamor; 06-03-2006 at 11:41.
Reply With Quote
  #2  
Old 04-03-2006, 18:54
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
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:
Code:
conarray(c, 2) = s.ObjectData("Comments")
Hope it helps,

Shelby
Reply With Quote
  #3  
Old 06-03-2006, 11:50
ghamor
Guest
 
Posts: n/a
Default Thanks!!!

Shelby,

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!

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


All times are GMT -5. The time now is 04:20.


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