Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yuri Rubinov
  Where is Yuri Rubinov?
 Philadelphia
 Pennsylvania - United States
 Yuri Rubinov
 To: Vivek Deodhar
  Where is Vivek Deodhar?
 SANGLI
 India
 Vivek Deodhar
 Tags
Subject: RE: Open Office Properties
Thread ID: 289133 Message ID: 289156 # Views: 55 # Ratings: 3
Version: Visual FoxPro 9 SP2 Category: Microsoft Office Automation
Date: Tuesday, December 28, 2010 7:52:29 PM         
   


> Hi,
> ......
> How to use "getProperties()" to list these properties (given above)
>
>
>
odoc = oooopenurl( "private:factory/scalc" )
> ocalcctrl = odoc.getcurrentcontroller()
> with ocalcctrl
>    ofg=.getPropertySetInfo()
>    ohj=ofg.getProperties()
> 
>    for ln=1 to 28
>       ?ohj(ln).name
>    endfor
> endwith

>
> hth
> Vivek


There are a couple of reasons I would do it differently (any reference to the object must be closed properly, what about property value, and similar):

aProp= ocalcctrl.getPropertySetInfo().getProperties
FOR ia=1 TO ALEN(aProp)
   ?aprop(ia).name,   oCalcCtrl.getpropertyvalue(aprop(ia).name)
endfor


Best Wishes,

Yuri Rubinov

ENTIRE THREAD

Open Office Properties Posted by Vivek Deodhar @ 12/28/2010 3:51:32 PM
RE: Open Office Properties Posted by Bhavbhuti Nathwani @ 12/28/2010 5:28:55 PM
RE: Open Office Properties Posted by Yuri Rubinov @ 12/28/2010 7:52:29 PM
RE: Open Office Properties Posted by tushar @ 12/29/2010 5:48:19 AM
RE: Open Office Properties Posted by Cesar @ 12/30/2010 1:42:47 AM